View source: R/add_dependencies.R
| add_dependencies | R Documentation |
This function detects external dependencies used in R/, NAMESPACE, and
@examples sections of roxygen2 headers and automatically adds these
dependencies in the Imports section of the DESCRIPTION file.
In the NAMESPACE this function detects dependencies mentioned as
import(pkg) and importFrom(pkg,fun).
In the R/ folder it detects functions called as pkg::fun() in the code
of each R files. In @examples sections it also detects packages attached
by library() or require().
The vignettes/ folder is also inspected and detected dependencies
(pkg::fun(), library() or require()) are added to the Suggests
field of the DESCRIPTION file (in addition to the packages
knitr and
rmarkdown).
If the project is a research compendium user can also inspect additional
folder(s) with the argument compendium to add dependencies to the
Imports section of the DESCRIPTION file. The detection process is the
same as the one used for vignettes/.
The tests/ folder is also inspected and detected dependencies
(pkg::fun(), library() or require()) are added to the Suggests
field of the DESCRIPTION file (in addition to the package
testthat).
add_dependencies(compendium = NULL)
compendium |
A character of length 1. The name of the folder to
recursively detect dependencies to be added to the Default is |
No return value.
Other development functions:
add_github_actions_check(),
add_github_actions_citation(),
add_github_actions_codecov(),
add_github_actions_codemeta(),
add_github_actions_document(),
add_github_actions_pkgdown(),
add_github_actions_render(),
add_r_depend(),
add_to_buildignore(),
add_to_gitignore()
## Not run:
add_dependencies()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.