Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-label.R
This function converts a numeric vector to a factor with a specified set of labels. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 |
v |
an input vector |
labels |
a vector specifying the set of labels |
The input vector v
is converted to a factor with the set
of levels corresponding to the unique values appearing in v
, assigned
labels specified by the labels
argument. If missing, the default
as.factor(v)
conversion is applied.
If labels!=NULL
then factor(v, labels=labels)
and
as.factor(v)
otherwise.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.