naturalfactor {naturalsort} | R Documentation |
naturalfactor
creates a factor with levels in natural order.
naturalfactor(x, levels, ordered = TRUE, ...)
x |
a character vector. |
levels |
a character vector whose elements might be appeared in |
ordered |
logical flag that determines whether the factor is ordered. |
... |
arguments that are passed to |