Skip to contents

Package overview

santoku santoku-package
A versatile cutting tool for R: package overview and options

Basic chop functions

Cut a vector into intervals

chop() kiru() tab()
Cut data into intervals
fillet()
Chop data precisely (for programmers)

Chopping by width

Cut a vector into intervals defined by width

brk_width(<Duration>)
Equal-width intervals for dates or datetimes
chop_width() brk_width() tab_width()
Chop into fixed-width intervals
chop_proportions() brk_proportions() tab_proportions()
Chop into proportions of the range of x
chop_evenly() brk_evenly() tab_evenly()
Chop into equal-width intervals

Chopping by n

Cut a vector into intervals defined by number of elements

Chopping and separating

Cut a vector into intervals, separating out common values

chop_spikes() brk_spikes() tab_spikes()
Chop common values into singleton intervals
dissect() tab_dissect()
Cut data into intervals, separating out common values

Other chop functions

Miscellaneous ways to cut a vector into intervals

chop_mean_sd() brk_mean_sd() tab_mean_sd()
Chop by standard deviations
chop_pretty() brk_pretty() tab_pretty()
Chop using pretty breakpoints
chop_fn() brk_fn() tab_fn()
Chop using an existing function
brk_default()
Create a standard set of breaks
brk_manual()
Create a breaks object manually

Label functions

Specify how to label the chopped intervals

lbl_dash()
Label chopped intervals like 1-4, 4-5, ...
lbl_discrete()
Label discrete data
lbl_endpoints() lbl_endpoint()
Label chopped intervals by their left or right endpoints
lbl_glue()
Label chopped intervals using the glue package
lbl_intervals()
Label chopped intervals using set notation
lbl_midpoints()
Label chopped intervals by their midpoints
lbl_seq()
Label chopped intervals in sequence

Miscellaneous

Other helper functions

format(<breaks>) print(<breaks>) is.breaks()
Class representing a set of intervals
exactly()
Define singleton intervals explicitly
non-standard-types
Tips for chopping non-standard types
percent()
Simple percentage formatter