Learn R Programming

censuspyrID (version 1.0.2)

is_expanded: Check Province Expansion Status

Description

This function checks whether a given province code corresponds to a province that has been expanded (i.e., administratively split or modified).

Usage

is_expanded(reg_code)

Value

A logical value:

  • TRUE if the province is marked as expanded,

  • FALSE otherwise.

Arguments

reg_code

non-harmonized province code (character or numeric).

Details

The function looks up the internal dataset prov_coverage. Expansion status is determined by the field expanded.

See Also

get_code_label()

Examples

Run this code
# Example: check expansion status of a province
get_code_label(5) #returns list of non-harmonized province code
is_expanded(1400)   # returns TRUE/FALSE for Riau province

Run the code above in your browser using DataLab