cut(x, breaks, labels=NULL, right=TRUE, dig.lab=3)
x
| a numeric vector which is to be converted to a factor by cutting. |
break
|
either a vector of cut points or number
giving the number of intervals which x is to be
cut into.
|
labels
| labels for the levels of the resulting category. By default labels are constructed using "(a,b]" interval notation.. |
right
| logical, indicating if the intervals should closed on the right (and open on the left) or vice versa. |
dig.lab
| integer which is used when labels are not given. It determines the number of digits used in formatting the break numbers. |
cut
divides the range of x
into intervals
and codes the values in x
according to which
interval they fall.
The leftmost interval corresponds to level one,
the next leftmost to level two and so on.
If a labels
parameter is specified, its values are used
to name the factor levels. If none is specified, the factor
level labels are constructed as "(b1, b2]"
, "(b2, b3]"
etc. for right=TRUE
and as "[b1, b2)"
, ... if
right=FALSE
.
In this case, dig.lab
indicates how many digits should be used in
formatting the numbers b1
, b2
, ....
split
for splitting a variable according to a group factor;
factor
, tabulate
, table
.