export_rang | R Documentation |
This function exports the results from resolve()
to an installation script that can be run in a fresh R environment.
export_rang(
rang,
path,
rang_as_comment = TRUE,
verbose = TRUE,
lib = NA,
cran_mirror = "https://cran.r-project.org/",
check_cran_mirror = TRUE,
bioc_mirror = "https://bioconductor.org/packages/"
)
rang |
output from |
path |
character, path of the exported installation script |
rang_as_comment |
logical, whether to write resolved result and the steps to reproduce
the file to |
verbose |
logical, pass to |
lib |
character, pass to |
cran_mirror |
character, which CRAN mirror to use |
check_cran_mirror |
logical, whether to check the CRAN mirror |
bioc_mirror |
character, which Bioconductor mirror to use |
The idea behind this is to determine the installation order of R packages locally. Then, the installation script can be deployed to another
fresh R session to install R packages. dockerize()
and apptainerize()
are more reasonable ways because a fresh R session with all system requirements
is provided. The current approach does not work in R < 2.1.0.
path
, invisibly
Ripley, B. (2005) Packages and their Management in R 2.1.0. R News, 5(1):8–11.
generate_installation_order()
if (interactive()) {
graph <- resolve(pkgs = c("openNLP", "LDAvis", "topicmodels", "quanteda"),
snapshot_date = "2020-01-16")
export_rang(graph, "rang.R")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.