-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_r_packages.R
28 lines (21 loc) · 1.05 KB
/
install_r_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
# BuildingSync®, Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors.
# See also https://github.com/BuildingSync/bsyncr-server/blob/main/LICENSE.txt
# Install required packages if not already installed
required_packages <- c(
"remotes", "crayon", "dplyr", "tidyr", "crul", "xml2", "testthat", "anytime", "lubridate", "segmented", "xts", "zoo", "ggplot2", "scales", "XML", "rappdirs", "gridExtra", "isdparser", "geonames", "hoardr", "data.table"
)
cat("Checking and installing required packages...\n")
for (pkg in required_packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg, repos = "http://cran.us.r-project.org")
}
}
library("remotes")
# RNOAA for weather data
remotes::install_github("ropensci/[email protected]", upgrade = "never")
# NMECR from kW Engineering
remotes::install_github("kW-Labs/[email protected]", upgrade = "never")
# BSync package for reading/writing BuildingSync files for NMECR
remotes::install_github("BuildingSync/[email protected]", upgrade = "never")
library(rnoaa)
rnoaa::ghcnd_stations()