Last active
April 21, 2021 07:14
-
-
Save fegue/ca2826add422cdce3cc67ef043045e9c to your computer and use it in GitHub Desktop.
[Install Maybe] R Script install packages that are not yet on computer #R #Rpackages
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
### INSTALL ALL LIBRARIES AND DEPENDENCIES ##### | |
# this will only install the packages that are not already installed on your computer i.e. packages won't get updated | |
libs <- c( | |
) | |
## which packages are not yet installed? | |
libsInstalled <- installed.packages()[,1] | |
libsToInstall <- libs[!libs %in% libsInstalled] | |
## fix if CRANextra mirror is down and causes problems with installations | |
#options(repos = getOption("repos")["CRAN"]) | |
## install | |
install.packages(libsToInstall) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment