recode: Recode the value of a vector

Description Usage Arguments Value Author(s) Examples

View source: R/recode.r

Description

Recode the value of a vector or matrix.

Usage

1
recode(x, from, to)

Arguments

x

a vector or matrix

from

original value of x

to

new value of x

Value

recoded x

Author(s)

TszKin Julian Chan [email protected]

Examples

1
2
3
x=rep(1:5,each=2)
recode(x,from=1:5,to=5:1)
recode(x,from=1:5,to=11:15)

Jmisc documentation built on May 30, 2017, 6:21 a.m.

Related to recode in Jmisc...