recode {sdtm.oak} | R Documentation |
Recode values
Description
recode()
recodes values in x
by matching elements in from
onto values
in to
.
Usage
recode(x, from = unique(na.omit(x)), to = from, .no_match = x, .na = NA)
Arguments
x |
An atomic vector of values are to be recoded. |
from |
A vector of values to be matched in |
to |
A vector of values to be used as replacement for values in |
.no_match |
Value to be used as replacement when cases in |
.na |
Value to be used to recode missing values. |
Value
A vector of recoded values.
[Package sdtm.oak version 0.2.0 Index]