coercion-factor | R Documentation |
Coercion functions for creating factors from other existing objects.
as.factor(x, ...) as.ordered(x, ...)
x |
A vector of data. |
... |
Other arguments passed on to methods. |
These functions override non-generic factor coercion functions provided in base so that packages can provide methods for different data types. The default methods call the base versions.
For as.factor()
, a factor. For as.ordered()
,
an ordered factor.
as.factor()
as.ordered()
as.factor(letters[1:5]) as.ordered(letters[1:5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.