-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.r
47 lines (42 loc) · 1.36 KB
/
init.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# Example R code to install packages
# See http://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details
#
###########################################################
# Update this line with the R packages to install:
my_packages = c('shiny',
'shinyBS',
'devtools',
'RCurl',
'httr',
'jsonlite',
'rjson',
'dplyr',
'tidyr',
'lubridate',
'rhandsontable',
'stringi',
'digest')
###########################################################
install_if_missing = function(p) {
if (p %in% rownames(installed.packages()) == FALSE) {
install.packages(p, repos='https://cran.rstudio.org', dependencies=TRUE)
}
else {
cat(paste('Skipping already installed package:', p, "\n"))
}
}
invisible(sapply(my_packages, install_if_missing))
library(devtools)
if ('shinyStore' %in% rownames(installed.packages()) == FALSE) {
install_github('trestletech/shinyStore')
}
if ('DT' %in% rownames(installed.packages()) == FALSE) {
install_github('rstudio/DT')
}
if ('scales' %in% rownames(installed.packages()) == FALSE) {
install_github('hadley/scales')
}
if ('plotly' %in% rownames(installed.packages()) == FALSE) {
install_github('ropensci/plotly')
}