swap_: Swap Elements in a Vector

Description Usage Arguments Details See Also Examples

View source: R/swap.R

Description

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

Usage

1
swap_(vec, ...)

Arguments

vec

the vector of items whose elemetns you will be replacing.

...

A set of named arguments, whereby we translate from names to values of those arguments.

Details

If to is of different type than from, it will be coerced to be of the same type.

See Also

swap

Examples

1
2
x <- c('a', 'a', 'b', 'c')
swap_(x, a="A")

Kmisc documentation built on May 29, 2017, 1:43 p.m.

Related to swap_ in Kmisc...