coercion-factor {generics} | R Documentation |
Factor coercion
Description
Coercion functions for creating factors from other existing objects.
Usage
as.factor(x, ...)
as.ordered(x, ...)
Arguments
x |
A vector of data. |
... |
Other arguments passed on to methods. |
Details
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.
Value
For as.factor()
, a factor. For as.ordered()
,
an ordered factor.
Methods
as.factor()
No methods found in currently loaded packages.
as.ordered()
No methods found in currently loaded packages.
Examples
as.factor(letters[1:5])
as.ordered(letters[1:5])
[Package generics version 0.1.3 Index]