get_all_external_dependencies | R Documentation |
List the external R packages required to be installed
get_all_external_dependencies(
dep_structure,
available_packages = as.data.frame(utils::available.packages()),
install_direction = "upstream",
package_list = NULL,
from_internal_dependencies = c("Depends", "Imports", "LinkingTo", "Suggests"),
from_external_dependencies = c("Depends", "Imports", "LinkingTo")
)
dep_structure |
( |
available_packages |
( |
install_direction |
"upstream", "downstream" or "all"; which packages to install (according to dependency structure). By default this is only "upstream" |
package_list |
( |
from_internal_dependencies |
Vector chosen from |
from_external_dependencies |
Vector chosen from |
A vector of 'external' R packages required to install
the selected 'internal' packages, ordered by install order (unless from_external_dependencies
does not include "Depends"
, "Imports"
and "LinkingTo"
). The core R packages
(e.g. methods
, utils
) are not included. The output can be used with remotes::system_requirements
to extract the system requirements needed for your packages, see example below.
## Not run:
x <- dependency_table("openpharma/stageddeps.electricity",
project_type = "repo@host", feature = "main"
)
# get external package dependencies
ex_deps <- get_all_external_dependencies(x)
print(ex_deps)
# get system dependencies (in this case there are none)
unique(unlist(lapply(ex_deps,
function(pkg, ...) {
remotes::system_requirements(package = pkg, ...)
},
os = "ubuntu",
os_release = "20.04"
)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.