Match the elements of a character vectors against a mapping table, that can specify multiple exact or partial matches.
charmap(x, maps, nomatch = NULL, partial = FALSE, rev = FALSE)
A character vector.
character vector to match
mapping tables. May be a character vector, a list of character vectors or a function.
character string to be used for non-matched elements of x
.
If NULL
, these elements are left unchanged.
logical that indicates if partial matches are allowed, in which case mappings are used as regular expressions.
logical that indicates if the mapping should be interpreted in the reverse way.