README.md

yamlpack

Yamlpack allows all currently installed R packages and their sources to be stored to and restored from a YAML file.

Intended uses include building docker images, installing packages en-masse, or re-installing R after a major revision (e.g. 3.6.3->4.0.0). The default parameters use pak for fast, parallelized installation of packages (https://github.com/r-lib/pak).

For fine-grained version control of packages and maximum reproducibility, you probably want the excellent renv package (https://github.com/rstudio/renv/) instead.

Installation

You can install the development version from: -

# install.packages("devtools")
devtools::install_github("combiz/yamlpack")

Example

The complete set of package names and sources currently installed can be written to a YAML file using write_yamlpack(): -

library(yamlpack)
write_yamlpack("yamlpack.yml")

Example of writing a yamlpack file

A YAML file previously saved with write_yamlpack() can be read using read_yamlpack(): -

yamlpack <- read_yamlpack("yamlpack.yml")

Example of reading a yamlpack file

Packages in a yamlpack object read in using write_yamlpack() can be installed using install_yamlpack(): -

install_yamlpack(yamlpack)

Example of installing a yamlpack file



combiz/yamlpack documentation built on April 26, 2020, 12:40 a.m.