Created
December 29, 2017 00:40
-
-
Save yulijia/3f11b8e20084ed5053153c1d6ee8bd54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
old.packages <- list.files("/R/x86_64-redhat-linux-gnu-library/3.3") | |
source("https://bioconductor.org/biocLite.R") | |
# Install packages in the previous version. | |
# For each package p in previous version... | |
for (p in old.packages[!grepl("LOCK",old.packages)]) { | |
# ... Only if p is not already installed | |
if (!(p %in% installed.packages()[,"Package"])) { | |
# Install p | |
# print(p) | |
install.packages(p) | |
if(!library(p,character.only = T,logical.return = T)){ | |
biocLite(p) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment