swap: Swap Elements in a Vector

Description Usage Arguments See Also

Description

This function swaps elements in a vector. See examples for usage.

Usage

1
swap(vec, from, to = names(from), ...)

Arguments

vec

the vector of items whose elements you will be replacing.

from

the items you will be mapping 'from'.

to

the items you will be mapping 'to'. must be same length and order as from.

...

optional arguments passed to match.

See Also

match


kevinushey/data.table.extras documentation built on May 20, 2019, 9:09 a.m.