cut.ordered | R Documentation |
Reduce the levels of an ordered factor.
## S3 method for class 'ordered'
cut(x, breaks, ...)
x |
an ordered factor. |
breaks |
a logical, character, or index vector of cut points. |
... |
further (unused) arguments. |
If breaks
is of class logical
it must have the same length
as the number of levels of x
.
If breaks
is of class character
partial matching with
the levels of x
is attempted.
Otherwise breaks
is assumed to index the levels.
An ordered factor.
Christian Buchta
Functions Missing in R: A Never Ending Story ;-)
cut
for converting numeric vectors to factor.
x <- ordered(sample(letters[1:3],10,rep=TRUE))
cut(x, c(FALSE,TRUE,FALSE))
cut(x, "b")
cut(x, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.