forked from AaronGullickson/system_generation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b073565
commit 556090d
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## check_packages.R | ||
|
||
#Run this script to check for packages that the other R scripts will use. If missing, try to install. | ||
#code borrowed from here: | ||
#http://www.vikram-baliga.com/blog/2015/7/19/a-hassle-free-way-to-verify-that-r-packages-are-installed-and-loaded | ||
|
||
#add new packages to the chain here | ||
packages = c("xml2","rlist","here","magrittr","ggplot2","dplyr","tibble","stringr","readr", | ||
"googlesheets","htmltab","DiagrammeR","wrswoR","reshape2") | ||
|
||
package.check <- lapply(packages, FUN = function(x) { | ||
if (!require(x, character.only = TRUE)) { | ||
install.packages(x, dependencies = TRUE) | ||
library(x, character.only = TRUE) | ||
} | ||
}) |