Map values of a vector.

map_values(x, map)

Arguments

x

vector.

map

named vector mapping names to values.

Value

vector.

Examples

if (FALSE) { x <- c('red','green','red','blue') map_values(x, map = c( 'red' = 'yellow', 'blue' = 'orange')) }