Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
batsim
batsim
Commits
dff84b7f
Commit
dff84b7f
authored
Sep 12, 2017
by
Millian Poquet
Browse files
[env] better R packages installation
parent
146f61be
Changes
1
Show whitespace changes
Inline
Side-by-side
environments/steps/result_analysis.yaml
View file @
dff84b7f
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment