Binning with cut
cut puts numbers into labelled intervals.
Example
s <- c(55, 72, 88, 95)
g <- cut(s, breaks = c(0, 60, 80, 100), labels = c("C", "B", "A"))
print(g)
print(table(g))Exercise
Intervals.
(s, breaks = b)Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.