Categorize numeric variable with mutate

The ggplot2 package has 3 functions that work well for these tasks: cut_number(): Makes n groups with (approximately) equal numbers of observation cut_interval(): Makes n groups with equal range cut_width: Makes groups of width width My go-to is cut_number() because this uses evenly spaced quantiles for binning observations. Here’s an example with skewed data. library(tidyverse) … Read more