diff --git a/404.html b/404.html index c375346..82ca243 100644 --- a/404.html +++ b/404.html @@ -32,15 +32,12 @@ rdeps - 0.0.0.9000 + 0.1
Casajus Nicolas (2023). rdeps: An R package to identify external packages used in a project. -R package version 0.0.0.9000, https://github.com/frbcesab/rdeps. +R package version 0.1, https://github.com/frbcesab/rdeps.
@Manual{, title = {rdeps: {An} {R} package to identify external packages used in a project}, author = {{Casajus Nicolas}}, year = {2023}, - note = {R package version 0.0.0.9000}, + note = {R package version 0.1}, url = {https://github.com/frbcesab/rdeps}, }diff --git a/index.html b/index.html index 8d1c4d9..8731c2e 100644 --- a/index.html +++ b/index.html @@ -14,8 +14,9 @@ + library(foo), require(foo), and foo::bar() and adds these + dependencies in the DESCRIPTION file in the sections Depends, Imports, and + Suggests.">
This function detects external packages used in an R project (package,
+compendium, website, etc.) and updates the sections Depends,
+Imports, and Suggests of the DESCRIPTION
file.
A DESCRIPTION
file can be created and added to an existing project with
+the function usethis::use_description()
.
All .R
, .Rmd
, and .qmd
files are screened to identify packages
+called by library(foo)
, library("foo")
, library('foo')
,
+require(foo)
, require("foo")
, require('foo')
or foo::bar()
.
Different types of dependencies are handled with the following rules:
if a package is called with library(foo)
or require(foo)
,
+it will be added to the section Depends of the DESCRIPTION
file
+(except for vignettes and tests);
if the package is called with foo::bar()
,
+it will be added to the section Imports of the DESCRIPTION
file
+(except for vignettes and tests);
if the package is only used in vignettes or tests,
+it will be added to the section Suggests of the DESCRIPTION
file.
This function also screens the NAMESPACE
file (it detects packages
+mentioned as import(foo)
and importFrom(foo,bar)
) and @examples
+sections of roxygen2
headers. The detected packages are added in the
+Imports section of the DESCRIPTION
file.
If the project is not an R package, non-standard folders are also screened
+(i.e. analyses/
, paper/
, etc.). The detected packages are added in the
+Imports section of the DESCRIPTION
file.
add_deps()
No return value.
+if (FALSE) {
+add_deps()
+}
+