Check the differences between the names (or codes) given in input and the names (or codes) of the corresponding selected United Kingdom statistical unit.
checkNamesUK(id, unit = c("country", "county"),
year = c("2020", "2019"),
matchWith = c("name", "code"),
scale = c("500", "20"), return_logical = FALSE,
print = TRUE, use_internet = TRUE)
Returns a string vector with nomatched names or a boolean vector indicating whether or not the id matched.
character vector with names or codes
the type of European statistical unit to check
year of the analysis
the type of id to check:
"name" | if unit names |
"code" | if unit code |
the scale of the map.
a logical value indicating whether nomatched id are returned.
a logical value indicating whether print the nomatched names
a logical value indicating wheter the coordinates are downloaded from https://github.com/mappinguniverse/geospatial. If FALSE
the maps downloaded during package installation will be used.
Alessio Serafini
The function provides a check between id name or code in the dataset and the corresponding selected United Kingdom statistical unit. unit
starts from the largest aggregate, "country", to the smallest, "county". Since unit can change over the years, the year of the data has to be provided.
checkNamesEU
, checkNamesUS
, checkNamesWR
, checkNamesDE
data("popUK")
ck <- checkNamesUK(popUK$name, unit = "country")
str(ck)
Run the code above in your browser using DataLab