Description Usage Arguments Details Value Methods Examples

Coercion functions for creating factors from other existing objects.

1 2 3 | ```
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()`

1 2 | ```
as.factor(letters[1:5])
as.ordered(letters[1:5])
``` |

generics documentation built on May 2, 2019, 9:22 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.