mapvalues: Map values

mapvaluesR Documentation

Map values

Description

Copy of plyr::mapvalues

Usage

mapvalues(x, from, to, warn_missing = T)

Arguments

x

A vector

from

A vector to change from

to

A vector to change to, can be same length or length 1 (recycled)

warn_missing

Warn if from values not present

Value

A vector

Examples

mapvalues(0:9, from = 3:5, to = c(-1, -1, -1))
mapvalues(0:9, from = 3:5, to = -1)

Deleetdk/kirkegaard documentation built on May 2, 2024, 7:12 p.m.