infer_deps | R Documentation |
Infers the R packages that your R package depends on.
infer_deps(
path = here::here("DESCRIPTION"),
which = c("Imports", "Suggests"),
imports_thresh = 2,
imports = NULL,
suggests = c("testthat", "rmarkdown", "markdown", "knitr", "remotes", "knitr", "covr"),
errors = c("reported", "fatal", "ignored"),
dev = FALSE,
progress = TRUE,
add_newlines = FALSE
)
path |
The path to a |
which |
Which types of dependencies to return. |
imports_thresh |
The minimum number of times that a package has to be called within your package to assign it as an Import. If is called less times than this threshold, it will instead be assigned as a Suggest, which means it will not be installed by default. |
imports |
R packages that are exempt from the |
suggests |
R packages that are exempt from the |
errors |
How should errors that occur during dependency enumeration be handled?
|
dev |
Boolean; include development dependencies? These packages are typically required when developing the project, but not when running it (i.e. you want them installed when humans are working on the project but not when computers are deploying it). Development dependencies include packages listed in the |
progress |
Boolean; report progress output while enumerating dependencies? |
add_newlines |
Prefix each package name with a newline character and two spaces. This is useful for formatting DESCRIPTION files. |
A character vector of R package names.
#### Get example DESCRIPTION file ####
url <- "https://github.com/neurogenomics/templateR/raw/master/DESCRIPTION"
path <- tempfile(fileext = "DESCRIPTION")
utils::download.file(url,path)
deps <- infer_deps(path = path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.