Created
November 5, 2016 08:18
-
-
Save messefor/72a8dfbf90088ddc29ebad9ae4b06bda to your computer and use it in GitHub Desktop.
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
# sample of checking package installed and load all. | |
required.pckg <- | |
c( | |
'dummies', | |
'tidyverse', | |
'glmnet' | |
) | |
not.installed <- !(required.pckg %in% installed.packages()[,'Package']) | |
if (any(not.installed)) { | |
install.packages(required.pckg[not.installed]) | |
} | |
sapply(required.pckg, require, character.only = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment