The purpose of this package is to support the setup of the R environment. The two main features are:
-
autos
to automatically source files and/or directories into your environment -
paths
to consistently set path objects across projects for I/O
Both are implemented using a configuration file to allow easy, custom configurations that can be used for multiple or all projects.
install.packages("envsetup")
# install.packages("devtools")
devtools::install_github("pharmaverse/envsetup")
- Create the _envsetup.yml configuration file to specify your autos
and paths and store centrally. See
vignette("config")
for more details on how to create your config. - Create or update your
.Rprofile
to read in the config and callrprofile()
library(envsetup)
# read configuration
envsetup_config <- config::get(file = "path/to/_envsetup.yml")
# pass configuration to rprofile() to setup the environment
rprofile(envsetup_config)