naturalfactor: Natural Ordering Factor
Description
naturalfactor
creates a factor with levels in natural order.
Usage
naturalfactor(x, levels, ordered = TRUE, ...)
Arguments
levels
a character vector whose elements might be appeared in x
.
ordered
logical flag that determines whether the factor is ordered.
...
arguments that are passed to factor
function.