-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.R
41 lines (40 loc) · 849 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#' Load libraries
#'
#' using tries to load all libraries passed to it, and if a library is not
#' found, using will install it and then load it.
#' @param ... The libraries / dependencies / packages to load.
using <- function(...) {
libs <- unlist(list(...))
req <- unlist(lapply(libs, require, character.only = TRUE))
need <- libs[req == FALSE]
if (length(need) > 0) {
install.packages(need)
lapply(need, require, character.only = TRUE)
}
}
using(
"plotly",
"lubridate",
"dplyr",
"tidyr",
"data.table",
"shinyFiles",
"shinyjs",
"fasttime",
"DT",
"suncalc",
"assertthat",
"geosphere",
"swfscMisc",
"padr",
"sqldf",
"rjson",
"R6",
"git2r",
"logging",
"testthat",
"shiny",
"shinyTime",
"shinyWidgets",
"shinyalert"
)