View source: R/detect_region_variables.R
detect_region_year | R Documentation |
Detects year of classification from the number of unique regions assuming the regularity that the number of regions weakly decreases in time. Given a vector of region names or codes and region level determines the year of regional classification. Returns all matching years. Works only for a vector that contains all possible values. Note that if the data does not contain all possible values the levels of a factor may.
detect_region_year(x, region_level)
x |
vector of regions |
region_level |
region level in x |
vector
df <- get_regionclassification("kunta", year = 2010)
detect_region_year(df$kunta_name, region_level = "kunta")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.