Learn R Programming

censuspyrID (version 1.0.2)

reg_list: Create region (province) list

Description

Internal helper function to generate a list of provinces, depending on whether harmonized or non-harmonized coding is used.

Usage

reg_list(harmonized = TRUE)

Value

A named vector, where values are province IDs and names are corresponding province labels.

Arguments

harmonized

Logical. If TRUE (default), use harmonized province codes. If FALSE, use non-harmonized province codes.

Details

  • If harmonized = TRUE, the function uses ref_label$provinceh_label.

  • If harmonized = FALSE, the function uses ref_label$province_label.