16.3 Cutting

16.3.1 chop()

santoku

https://hughjonesd.github.io/santoku/tutorials/00-visualintroduction.html

cut() in base R

ntile() in dplyr:

chop()

If data is beyond the limits of breaks, they will be extended automatically, unless extend = FALSE, and values beyond the bounds will be converted to NA:

To chop a single number into a separate category, put the number twice in breaks:

To quickly produce a table of chopped data, use tab():