resolve | R Documentation |
This function recursively queries dependencies of R packages at a specific snapshot time. The dependency graph can then be used to recreate the computational environment. The data on dependencies are provided by R-hub.
resolve(
pkgs = ".",
snapshot_date,
no_enhances = TRUE,
no_suggests = TRUE,
query_sysreqs = TRUE,
os = "ubuntu-20.04",
verbose = FALSE
)
pkgs |
|
snapshot_date |
Snapshot date, if not specified, assume to be a month ago |
no_enhances |
logical, whether to ignore packages in the "Enhances" field |
no_suggests |
logical, whether to ignore packages in the "Suggests" field |
query_sysreqs |
logical, whether to query for System Requirements. Important: Archived CRAN can't be queried for system requirements. Those packages are assumed to have no system requirement. |
os |
character, which OS to query for system requirements |
verbose |
logical, whether to display messages |
a rang
S3 object with the following items
call |
original function call |
ranglets |
List of dependency graphs of all packages in |
snapshot_date |
|
no_enhances |
|
no_suggests |
|
unresolved_pkgsrefs |
Packages that can't be resolved |
sysreqs |
System requirements as Linux commands |
r_version |
The latest R version as of |
os |
|
dockerize()
if (interactive()) {
graph <- resolve(pkgs = c("openNLP", "LDAvis", "topicmodels", "quanteda"),
snapshot_date = "2020-01-16")
graph
## to resolve github packages
gh_graph <- resolve(pkgs = c("https://github.com/schochastics/rtoot"),
snapshot_date = "2022-11-28")
gh_graph
## scanning
graph <- resolve(snapshot_date = "2022-11-28")
## But we recommend this:
pkgs <- as_pkgrefs(".")
pkgs ## check the accuracy
graph <- resolve(pkgs, snapshot_date = "2022-11-28")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.