-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.R
24 lines (21 loc) · 952 Bytes
/
install.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
# Packages you will need for this shiny app
packages = c('shiny','shinyjs','leaflet','leaflet.extras','httr','tidyr','readr','scales','lattice','jsonlite',
'DT', 'shinyBS', 'sp', 'ncdf4', 'rvest', 'ggthemes', 'httr', 'shinycssloaders', 'changepoint', 'rnpn',
'data.table', 'grDevices', 'plotly' , 'knitr', 'kableExtra', 'rgdal', 'rjson', 'RCurl', 'phenocamapi',
'birk', 'devtools', 'birk')
# Identify new (not installed) packages
new.packages = packages[!(packages %in% installed.packages()[,"Package"])]
# Loop through and download the new packages
if (length(new.packages)[1]==0){
message('All packages already installed')
}else{
for (i in 1:length(new.packages)){
message(paste0('Installing: ', new.packages))
if (new.packages[i] == 'AppEEARS4R'){
library(devtools)
devtools::install_github("katharynduffy/AppEEARS4R")
}else {
install.packages(new.packages[i])
}
}
}