Skip to contents

Retrieves the current column mapping configuration set by config_pviem().

Usage

get_pviem_config()

Value

[list] Current column mappings, or NULL if config_pviem() hasn't been called.

Examples

# \donttest{
# Get default column mappings before setup
get_pviem_config()
#> $admin
#> [1] "dist_code"
#> 
#> $year
#> [1] "year"
#> 
#> $month
#> [1] "month"
#> 
#> $birth
#> [1] "live_births"
#> 
#> $monthly
#> [1] FALSE
#> 
with_config(list(admin = c("province", "district"), birth = "monthly_births"), {
  get_pviem_config()
})
#> $admin
#> [1] "province" "district"
#> 
#> $year
#> [1] "year"
#> 
#> $month
#> [1] "month"
#> 
#> $birth
#> [1] "monthly_births"
#> 
#> $monthly
#> [1] FALSE
#> 
# After with_config, mappings revert to default
get_pviem_config()
#> $admin
#> [1] "dist_code"
#> 
#> $year
#> [1] "year"
#> 
#> $month
#> [1] "month"
#> 
#> $birth
#> [1] "live_births"
#> 
#> $monthly
#> [1] FALSE
#> 
# }