forked from karrtikiyer-tw/bahmni-shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_packages.R
45 lines (42 loc) · 1.87 KB
/
install_packages.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
if (!"install.load" %in% rownames(installed.packages()))
install.packages("install.load", repos="http://cran.rstudio.com/")
library(install.load)
if (!"devtools" %in% rownames(installed.packages()))
install.packages("devtools", repos="http://cran.rstudio.com/")
library(devtools)
install <- function(package, version){
if (!package %in% rownames(installed.packages()))
devtools::install_version(package, version = version, repos="http://cran.rstudio.com/")
}
fail_if_error_in_install <- function(package, version){
withCallingHandlers(install(package, version), warning = function(w) stop(w))
}
fail_if_error_in_install("RPostgreSQL", "0.6-2")
fail_if_error_in_install("properties", "0.0-8")
fail_if_error_in_install("DBI", "0.7")
fail_if_error_in_install("shiny", "1.0.3")
fail_if_error_in_install("shinycssloaders", "0.2.0")
fail_if_error_in_install("lubridate", "1.6.0")
fail_if_error_in_install("tidyr", "0.6.3")
fail_if_error_in_install("stringr", "1.2.0")
fail_if_error_in_install("readr", "1.1.1")
fail_if_error_in_install("RMySQL", "0.10.11")
fail_if_error_in_install("ggplot2", "2.2.1")
fail_if_error_in_install("scales", "0.4.1")
fail_if_error_in_install("RcppEigen", "0.3.3.3.0")
fail_if_error_in_install("eeptools", "1.1.0")
fail_if_error_in_install("data.table", "1.10.4")
fail_if_error_in_install("dbplyr", "1.1.0")
fail_if_error_in_install("dplyr", "0.7.2")
fail_if_error_in_install("DT", "0.2")
fail_if_error_in_install("shinyjs", "0.9.1")
fail_if_error_in_install("shinyBS", "0.61")
fail_if_error_in_install("purrr", "0.2.3")
fail_if_error_in_install("lazyeval", "0.2.0")
fail_if_error_in_install("rjson", "0.2.15")
fail_if_error_in_install("plotly", "4.7.1")
fail_if_error_in_install("ggmap", "2.6.1")
fail_if_error_in_install("leaflet", "1.1.0")
fail_if_error_in_install("bcrypt", "1.0")
fail_if_error_in_install("RSQLite", "2.0")
fail_if_error_in_install("DescTools", "0.99.21")