rapids/rules/renv.smk

20 lines
584 B
Plaintext
Raw Normal View History

2020-05-02 01:46:04 +02:00
## renv_install: installs renv onto machine
rule renv_install:
shell:
2020-05-04 19:04:02 +02:00
"R -e 'if (!requireNamespace(\"renv\", quietly = TRUE)) install.packages(\"renv\", repos=\"http://cran.us.r-project.org\")'"
2020-05-02 01:46:04 +02:00
## renv_install: initialize a renv environment for this project
rule renv_init:
shell:
2020-05-04 19:04:02 +02:00
"R -e 'renv::init()'"
2020-05-02 01:46:04 +02:00
## renv_snap : Look for new R packages in files & archives them
rule renv_snap:
shell:
"R -e 'renv::snapshot()'"
## renv_restore: Installs archived packages onto a new machine
rule renv_restore:
shell:
2020-05-07 00:00:44 +02:00
"R -e 'renv::restore()'"