-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_r_packages.R
More file actions
28 lines (21 loc) · 1.05 KB
/
install_r_packages.R
File metadata and controls
28 lines (21 loc) · 1.05 KB
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/rnoaa@v1.4.0", upgrade = "never")
# NMECR from kW Engineering
remotes::install_github("kW-Labs/nmecr@v1.0.17", upgrade = "never")
# BSync package for reading/writing BuildingSync files for NMECR
remotes::install_github("BuildingSync/bsyncr@v0.2.0", upgrade = "never")
library(rnoaa)
rnoaa::ghcnd_stations()