checkNamesDE: Check Germany names

View source: R/DE.R

checkNamesDER Documentation

Check Germany names

Description

Check the differences between the names (or codes) given in input and the names (or codes), of the corresponding selected Germany statistical unit.

Usage

checkNamesDE(id, unit = c("state", "district", "municipal", "municipality"), 
             matchWith = c("name", "code", "code_full"), return_logical = FALSE, 
             print = TRUE, use_internet = TRUE)

Arguments

id

character vector with names or codes

unit

the type of European statistical unit to check

matchWith

the type of id to check:

"name" if unit names
"code" if unit code
"code_full" if unit complete code
return_logical

a logical value indicating whether nomatched id are returned.

print

a logical value indicating whether print the nomatched names

use_internet

a logical value indicating wheter the coordinates are downloaded from https://github.com/dataallaround/geospatial. If FALSE the maps downloaded during package installation will be used.

Details

The function provides a check between id name or code in the dataset and the corresponding selected Germany statistical unit. unit starts from the largest aggregate, "state", to the smallest, "municipality".

Value

Returns a string vector with nomatched names or a boolean vector indicating whether or not the id matched.

Author(s)

Alessio Serafini

See Also

checkNamesEU, checkNamesUS, checkNamesWR, checkNamesUK

Examples

data("popDE")
ck <- checkNamesDE(popDE$code_state, unit = "state", matchWith = "code_full")
str(ck)

mapping documentation built on Oct. 19, 2023, 5:06 p.m.