Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

charmap

Substituting Strings Against a Mapping Table


Description

Match the elements of a character vectors against a mapping table, that can specify multiple exact or partial matches.

Usage

charmap(x, maps, nomatch = NULL, partial = FALSE, rev = FALSE)

Arguments

x

character vector to match

maps

mapping tables. May be a character vector, a list of character vectors or a function.

nomatch

character string to be used for non-matched elements of x. If NULL, these elements are left unchanged.

partial

logical that indicates if partial matches are allowed, in which case mappings are used as regular expressions.

rev

logical that indicates if the mapping should be interpreted in the reverse way.


pkgmaker

Development Utilities for R Packages

v0.32.2
GPL (>= 2)
Authors
Renaud Gaujoux [aut, cre]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.