Use cut functions or group_by function.
group_by functions create groups from data frame fields whereas cut function can create groups from vectors, lists and others as well.
df %>% group_by(variable) %>% summarize(...)
or
cut(df$variable, breaks, ... )