This function matches territorial units with a list of known units to derive the administrative hierarchy ID.
matchUnits(input = NULL, source = NULL, verbose = FALSE)
[data.frame(1)
] table in which to match administrative
units.
[integerish(1)
] the geometry ID (geoID
) from
which the terms have been taken.
[logical(1)
] be verbose about what is happening
(default FALSE
).
The table provided in input
, where the given columns are
replaced by the column ahID
, which contains the administrative
hierarchy ID.
names(input)
must contain at least the al1 = ...
to
match at least a certain nation. Further administrative levels are denoted
by column names al2
, al3
, ...