
Chop into proportions of the range of x
Source:R/chop-by-width.R, R/breaks-by-width.R, R/tab.R
chop_proportions.Rdchop_proportions() chops x into proportions of its range, excluding
infinite values.
Usage
chop_proportions(x, proportions, ..., raw = TRUE)
brk_proportions(proportions)
tab_proportions(x, proportions, ..., raw = TRUE)Arguments
- x
A vector.
- proportions
Numeric vector between 0 and 1: proportions of x's range. If
proportionshas names, these will be used for labels.- ...
Passed to
chop().- raw
Logical. Use raw values in labels?
Value
chop_* functions return a factor of the same length as x.
brk_* functions return a function to create breaks.
tab_* functions return a contingency table().
Details
By default, labels show the raw numeric endpoints. To label intervals by
the proportions, use raw = FALSE.
See also
Other chopping functions:
chop(),
chop_equally(),
chop_evenly(),
chop_fn(),
chop_mean_sd(),
chop_n(),
chop_quantiles(),
chop_spikes(),
chop_width(),
fillet()