Reads a region-specific configuration file generated by setup-app.R
and makes all configuration objects (spatial data, options, text content,
themes) available to the shinyplanr app modules.
Arguments
- config_path
Character. Path to the
shinyplanr_config.rdsfile. Defaults to"config/shinyplanr_config.rds", which is the location used by projects created withcreate_shinyplanr_template(). The path is resolved relative to the current working directory.
Value
Invisibly returns the config list. Called for its side effect of populating the shinyplanr package namespace with the region configuration.
Details
This function must be called before run_app(). The
app.R file generated by create_shinyplanr_template()
calls this automatically.
Examples
if (FALSE) { # \dontrun{
# In a deployment project's app.R:
shinyplanr::load_config("config/shinyplanr_config.rds")
shinyplanr::run_app()
} # }
