-
Notifications
You must be signed in to change notification settings - Fork 4
/
usefulpackages.R
22 lines (19 loc) · 928 Bytes
/
usefulpackages.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
options("repos"="http://cran.rstudio.com") # set the cran mirror
packages = c("devtools","ggplot2","dplyr","tidyr","RcppEigen", "stringr","gridExtra",
"RCurl","RJSONIO","RJDBC","knitr","lme4","latticeExtra","RMySQL",
"XLConnect","Cairo","opencpu","rstudio")
packages = setdiff(packages, installed.packages()[,"Package"])
if (length(packages) != 0){
(install.packages(packages, dep=c("Depends", "Imports")))
}
# Packages from github are installed unconditionally
ghpackages = c("rstudio/htmltools","trestletech/shinyTable","rstudio/rmarkdown","rstudio/shiny")
devtools::install_github(ghpackages)
#ghFrame = do.call(rbind, strsplit(ghpackages,"/"))
#reqPackages = setdiff(ghFrame[,2], installed.packages()[,"Package"])
#ghPack = ghFrame[ghFrame[,2]==reqPackages,,drop=FALSE]
#
#if (nrow(ghPack) != 0){
# (devtools::install_github(apply(ghPack,1,paste,collapse="/")))
#}
update.packages(ask=FALSE)