The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This guide walks through how to set up basic path configurations in
your _envsetup.yml
file.
Scripts typically execute in different environments depending on your workflow:
Each execution environment can have different configurations:
Let’s create a practical example for a project called project1 that needs data input, result output, and program storage locations.
library(envsetup)
# Create temporary directory for demonstration
dir <- fs::file_temp()
dir.create(dir)
config_path <- file.path(dir, "_envsetup.yml")
# Write a basic config file
file_conn <- file(config_path)
writeLines(
"default:
paths:
data: '/demo/DEV/username/project1/data'
output: '/demo/DEV/username/project1/output'
programs: '/demo/DEV/username/project1/programs'", file_conn)
close(file_conn)
Once configured, your paths are available in the
envsetup_environment
environment within the envsetup
package environment:
The rprofile()
function:
1. Creates a special environment called
envsetup_environment
2. Populates it with your configured path objects
3. Makes these objects accessible in your code via the
get_path()
, read_path()
, and
write_path()
With this setup:
Consistency: All team members use the same path structure
Flexibility: Easy to change paths without modifying code
Clarity: Path purposes are clearly defined
Maintainability: Centralized configuration management
Now that you understand basic path configuration, the next guide will show you how to manage multiple environments (dev, qa, prod) with different configurations.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.