Skip to contents

Get the MSOA value from the config

Usage

get_cfg_val_msoa(key = NULL, cfg_dir = NULL, cfg_name = NULL, cfg = NULL)

Arguments

key

A single character string of hierarchical keys to look up which is flattened by separating each level of the hierarchy with a dot.

cfg_dir

A character string specifying the config directory, or NULL for the default. Default: An OS-specific path for user configuration files in the user's home directory.

cfg_name

A character string specifying the config file name, or NULL for the default. Default: 'config.yml'

cfg

A list of nested lists, with 'leaf' nodes specifying configuration values. Default: The template config returned by generate_cfg_template()

Value

An integer: the configured MSOA value which is either the number specified, or, if this has a value of NA, the total number of MSOAs in the given population data file.

Examples

get_cfg_val_msoa(cfg = generate_cfg_template())
#> [1] 2