Skip to contents

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.

Usage

load_config(config_path = "config/shinyplanr_config.rds")

Arguments

config_path

Character. Path to the shinyplanr_config.rds file. Defaults to "config/shinyplanr_config.rds", which is the location used by projects created with create_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()
} # }