Learn R Programming

cartographer (version 0.2.1)

resolve_feature_names: 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")

Value

Character vector of the canonicalised names.

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.

Examples

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

Run the code above in your browser using DataLab