dwd-cmsaf-r
R and RStudio
Initiate Environment
General
- Installation of RStudio and R
Packages
- The package devtools will be used for the developement of R-Packages.
install.packages("devtools", dependencies = TRUE)
- The package rhub will be used to check compatibility of different platforms.
install.packages("rhub", dependencies = TRUE)
- The Package roxygen2 will be used to create documentations for CRAN. It will be installed with devtools.
CM SAF
devtools::load_all("./cmsafops")
devtools::load_all("./cmsafvis")
devtools::load_all("./cmsafs")
- Start the CM SAF R Toolbox
run_toolbox(launch.browser = TRUE)
Build and Installation
Build Package
devtools::build()
Installation of Packages
- (Windows) Installation of RTools
- Navigate to R package directory
cd\
dir Users\ ...
R CMD INSTALL cmsafops.tar.gz
Other important commands
devtools::test()
devtools::document()
devtools::load_all()
- Add a packages (e.g., trend package):
usethis::use_package("trend")