powered by
chop_width() chops x into intervals of fixed width.
chop_width()
x
width
chop_width(x, width, start, ..., left = sign(width) > 0)brk_width(width, start)# S3 method for default brk_width(width, start)tab_width(x, width, start, ..., left = sign(width) > 0)
brk_width(width, start)
# S3 method for default brk_width(width, start)
tab_width(x, width, start, ..., left = sign(width) > 0)
chop_* functions return a factor of the same length as x.
chop_*
factor
brk_* functions return a function to create breaks.
brk_*
function
breaks
tab_* functions return a contingency table().
tab_*
table()
A vector.
Width of intervals.
Starting point for intervals. By default the smallest finite x (largest if width is negative).
Passed to chop().
chop()
Logical. Left-closed or right-closed breaks?
If width is negative, chop_width() sets left = FALSE and intervals will go downwards from start.
left = FALSE
start
brk_width-for-datetime
Other chopping functions: chop_equally(), chop_evenly(), chop_fn(), chop_mean_sd(), chop_n(), chop_proportions(), chop_quantiles(), chop(), fillet()
chop_equally()
chop_evenly()
chop_fn()
chop_mean_sd()
chop_n()
chop_proportions()
chop_quantiles()
fillet()
chop_width(1:10, 2) chop_width(1:10, 2, start = 0) chop_width(1:9, -2) chop(1:10, brk_width(2, 0)) tab_width(1:10, 2, start = 0)
Run the code above in your browser using DataLab