.BG
.VE $Header: /usr3/s/current/s/.help/RCS/cut,v 1.2 83/12/30 19:26:58 rab Exp $
.FN cut
.TL
cut: Create Category by Cutting Continuous Data
.CS
cut(x, breaks, labels)
.PP
.AG x
data vector.
Missing values (NAs) are allowed.
.AG breaks
either a vector of breakpoints, or the number of equal-width
intervals into which the data in `x' should be cut.  If a
vector of breakpoints is given, the category will have
`len(breaks)\-1' groups, corresponding to data in the intervals between
successive values in `breaks' (after `breaks' is sorted).
Data less than or equal to the first breakpoint or greater than the
last breakpoint is returned as NA.
.AG labels
character vector of labels for the intervals.  Default is to
encode the breakpoints to make up interval names (if `break'
is a vector), or to use the names `Range 1', etc., if
`breaks' is a single integer.
.RT
a category structure with components `Label' and `Data'.
.RC Data
vector of integers telling which group each point in `x'
belonged to.
.RC Label
vector of character names for each group.
.EX
cut(x,3)   # cut into 3 groups
cut(x, breaks)  # cut based on given breakpoints
cut(x, pretty(x))   # approx 5 "pretty" intervals
.KW basic*
.KW category
.WR
