relabel {memisc} | R Documentation |
This function changes the labels of a factor of any object
that has a names
, labels
, value.labels
, or variable.labels
attribute.
## Default S3 method: relabel(x,...) ## S3 method for class 'factor': relabel(x,...)
x |
An object with a names , labels , value.labels , or variable.labels attribute |
... |
A sequence of named arguments, all of type character |
This function changes the names or labels of x
according to the
remaining arguments. The argument names are the old
names, the values are the new names.
The object x
with new labels defined by the ... arguments.
f <- as.factor(rep(letters[1:4],5)) print(f) relabel(f, a="A", b="B", c="C", d="D" )