View source: R/region_codes_and_names.R
codes_to_names | R Documentation |
Why do these functions exist? Replace by recode_region? Also:
codes_to_names(
x,
year = NULL,
region_level = NULL,
use_char_length_info = NULL,
set_region_codes = FALSE,
lang = "fi",
offline = TRUE
)
x |
a character (vector) of region codes |
year |
integer, the year of the applied classification key. |
region_level |
character, optional region level of the input region codes |
use_char_length_info |
TRUE or named vector, whether to use code character length information in determining their region level. Defaults to NULL. |
set_region_codes |
logical, whether tries to set standard region codes.
Defaults to |
lang |
|
offline |
logical, whether works offline with package data. Defaults to |
key_recode(v, get_regionclassification(), by = "values")
Works with standardized region codes. A good practice is to first standardize
your region codes using set_region_codes()
. codes_to_names()
,
however can check if the region codes are standardized and applies set_region_codes()
if they are not.
data.frame
v <- c("SSS", "KU103", "KU061","SK213", "MK04")
codes_to_names(v)
v <- c("SSS", "KU103", "KU061","SK213", "MK04", "nav9w4t")
codes_to_names(v)
f <- factor(c("SSS", "KU103", "KU061","SK213", "MK04"))
codes_to_names(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.