replace: Replace Values in a Vector

Description Usage Arguments Value Note References

Description

replace replaces the values in x with indices given in list by those given in values. If necessary, the values in values are recycled.

Usage

1
replace(x, list, values)

Arguments

x

vector

list

an index vector

values

replacement values

Value

A vector with the values replaced.

Note

x is unchanged: remember to assign the result.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.


robertzk/monadicbase documentation built on May 27, 2019, 10:35 a.m.