Commit dff84b7f authored by Millian Poquet's avatar Millian Poquet
Browse files

[env] better R packages installation

parent 146f61be
......@@ -16,6 +16,23 @@
- install_r_packages:
- exec_in: |
R --vanilla <<EOF
install.packages(c('ggplot2','scales','dplyr'), repos='$${r_mirror}')
q()
'%notin%' <- function(x,y)!('%in%'(x,y))
printf <- function(...)print(sprintf(...))
to_install = c('ggplot2','scales','dplyr')
install.packages(to_install,
repos='$${r_mirror}',
clean=TRUE)
quit_status = 0
for (package in to_install) {
if (package %notin% rownames(installed.packages())) {
printf("Package %s has not been installed.", package)
quit_status = 1
}
}
quit(status=quit_status)
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment