resolve_feature_names {cartographer}R Documentation

Canonicalise feature names accounting for aliases and character case

Description

Names are resolved by checking for the first match using:

  1. case sensitive match, then

  2. case sensitive match using aliases, then

  3. case insensitive match, then

  4. case insensitive match using aliases.

Usage

resolve_feature_names(feature_names, feature_type, unmatched = "error")

Arguments

feature_names

Character vector of feature names in the data.

feature_type

Type of map feature. See feature_types() for a list of registered types.

unmatched

Controls behaviour when feature_names contains values that do not match registered feature names. Possible values are "error" to throw an error or "pass" to return the original values unaltered.

Value

Character vector of the canonicalised names.

Examples

resolve_feature_names(c("LEE", "ansoN"), feature_type = "sf.nc")
resolve_feature_names(c("LEE", "ansoNe"), feature_type = "sf.nc", unmatched = "pass")

[Package cartographer version 0.2.1 Index]