Learn R Programming

mosaic (version 0.13.0)

standardName: Standardization of Geographic Names

Description

Often different sources of geographical data will use different names for the same region. These utilities make it easier to merge data from different sources by converting names to standardized forms.

Usage

standardName(x, standard, ignore.case = TRUE, returnAlternatives = FALSE,
  quiet = FALSE)

standardCountry(x, ignore.case = TRUE, returnAlternatives = FALSE, quiet = FALSE)

standardState(x, ignore.case = TRUE, returnAlternatives = FALSE, quiet = FALSE)

Arguments

x
A vector with the region names to standardize
standard
a named vector providing the map from non-standard names (names of vector) to standard names (values of vector)
ignore.case
a logical indicating whether case should be ignored when matching.
returnAlternatives
a logical indicating whether all alternatives should be returned in addition to the standard name.
quiet
a logical indicating whether warnings should be surpressed

Details

[object Object],[object Object],[object Object] In all three cases, any names not found in standard will be left unaltered. Unless supressed, a warning message will indicate the number of such cases, if there are any.