-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.r
23 lines (20 loc) · 915 Bytes
/
setup.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/local/bin/Rscript
##################################################
#### REGGAE - Regression Generator & Analyzer ####
#### SETUP code ####
#### AUTHOR: Liliana C. Gallegos ####
#### EMAIL: [email protected] ####
##################################################
InsPack <- function(pack) {
for (i in 1:length(pack)) {
if (!pack[i] %in% installed.packages()) {
cat("\nInstalling required package: \n", pack[i], "\n")
install.packages(pack[i], repos="https://cran.revolutionanalytics.com/")
if ( !pack[i] == "car"){
install.packages("car",dependencies=TRUE)
}
} else { cat('\n Package already installed: ', pack[i], '\n') }
}
}
pack <- c("optparse", "corrplot", "bindr", "MuMIn", "cvq2", "dplyr","car", "ggplot2", "caret", "Metrics", "tidyselect") # "R1magic", "DEMOVA", "magic"
InsPack(pack)