Last active
January 10, 2017 19:23
-
-
Save RobertMyles/72757a6a3a92e9227d7e20e8d2246fd1 to your computer and use it in GitHub Desktop.
Updated R today and realized that I lost a load of packages that I had installed previously. Instead of re-installing them one by one, I just did this (it works for Mac OS, it'll be slightly different on Windows):
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
Old_packList <- as.list(installed.packages("/Library/Frameworks/R.framework/Versions/3.2/Resources/library")) | |
# here, my R version was 3.2. Change it for the R version you want the packages from! | |
Old <- as.character(Old_packList) | |
install.packages(Old) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment