remap {mappings}R Documentation

Re-map a variable

Description

Apply a mapping to a vector directly. The mapping is temporary and not saved.

Usage

remap(x, ...)

Arguments

x

The values to apply the mapping to.

...

Passed to mapping().

Value

The values returned by calling the mapping function.

Examples

x <- c("A", "B", "A")
remap(x, c(A=0, B=1))

[Package mappings version 0.1 Index]