https://github.com/combiz/yamlpack
En-masse installation of R-packages
https://github.com/combiz/yamlpack
Last synced: 5 months ago
JSON representation
En-masse installation of R-packages
- Host: GitHub
- URL: https://github.com/combiz/yamlpack
- Owner: combiz
- License: other
- Created: 2020-02-17T19:03:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T17:11:46.000Z (almost 5 years ago)
- Last Synced: 2024-08-13T07:14:01.187Z (8 months ago)
- Language: R
- Size: 158 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - combiz/yamlpack - En-masse installation of R-packages (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# 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: -
``` r
# 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()`: -
```{r write_example, eval = FALSE}
library(yamlpack)
write_yamlpack("yamlpack.yml")
```
A YAML file previously saved with `write_yamlpack()` can be read using `read_yamlpack()`: -
```{r read_example, eval = FALSE}
yamlpack <- read_yamlpack("yamlpack.yml")
```
Packages in a yamlpack object read in using `write_yamlpack()` can be installed using `install_yamlpack()`: -
```{r install_example, eval = FALSE}
install_yamlpack(yamlpack)
```