Last active
June 17, 2018 18:04
-
-
Save dceoy/bd053f6ba3706d5e40686f6064959c89 to your computer and use it in GitHub Desktop.
[R] Install R packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
if(length(argv <- commandArgs(trailingOnly = TRUE)) > 0) { | |
install.packages(pkgs = argv, | |
repos = c(CRAN = 'https://cran.rstudio.com/'), | |
dependencies = TRUE) | |
} else { | |
message('Nothig to do.') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment