View source: R/test_region_classifications.R
is_region_code | R Documentation |
Given a vector of potential region codes, returns a vector of logicals indicating which elements are region codes. Allows prefixed and non-prefixed region codes.
is_region_code(x, region_level = NULL, year = NULL, offline = TRUE)
x |
vector, a potential region code. |
region_level |
character, optional region level of the input region codes.
Possible |
year |
double, year of region classification searched. |
offline |
logical, whether works offline with package data. Defaults to |
Uses is_region_code_with_prefix()
and is_region_code_without_prefix()
.
These functions are required as such also elsewhere.
Region variable detection functions use the testing functions here.
logical
is_region_code(c("KU005", "005"))
is_region_code_with_prefix(c("KU005", "005"))
is_region_code_without_prefix(c("KU005", "005"))
is_region_code_with_prefix(c("KU005", "005"), region_level = "maakunta")
is_region_code_without_prefix(c("KU005", "005"), region_level = "maakunta")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.