remap: Re-map a variable

View source: R/mapping.R

remapR 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))

benjaminrich/mappings documentation built on June 23, 2024, 1:23 a.m.