forked from rossyndicate/cameron_peak_fire_study
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package_loader.R
58 lines (46 loc) · 1.22 KB
/
package_loader.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
48
49
50
51
52
53
54
55
56
57
58
#Function to install and library all required packages#
package_load <- function(package_names){
for(i in 1:length(package_names)){
if(!package_names[i] %in% installed.packages()){
install.packages(package_names[i])
}
library(package_names[i],character.only = TRUE)
}
}
#list of packages
pack_req <- c("tidyverse",
"lubridate",
"ggplot2",
"sf",
"terra",
"nhdplusTools",
"padr",
"rjson",
"rvest",
"dataRetrieval",
"httr",
"tigris",
"raster",
"janitor",
"CDSS",
"devtools",
"plotly",
"arrow",
"jsonlite",
"ggpubr",
"ggthemes",
"scales",
"corrplot",
"padr",
"gghighlight",
"geomtextpath",
"ggbeeswarm",
"broom",
"trend",
"leaflet",
"tmap")
package_load(pack_req)
devtools::install_github("anguswg-ucsb/cdssr")
# Load package
library(cdssr)
remove(pack_req, package_load)