Description Usage Arguments Value Examples
View source: R/group_by_breaks.R
Classify elements from a vector into groups, according to break points
1 | group_by_breaks(x, breaks = NA)
|
x |
A numeric vector to be sorted into groups |
breaks |
A numeric vector with the break points |
A numeric vector with the same length of x
,
1 2 3 4 5 6 7 8 9 | x <- c(995.35053, 1307.03364, 275.26068, 1008.82226, 534.79647, 613.39754, 1983.56067, 712.05917, 1369.12803,
369.23409, 547.17646, -421.07642, 704.41723, 187.49952, 1194.94762, 805.22835, 1106.85654, 335.69029,
488.50666, 452.49957, 106.18092, 821.41591, 450.92849, 797.47272, 297.16704, 438.47160, 1018.22918,
700.39850, 289.99789, 196.93818, 844.31660, 891.60562, -45.03063, 961.54748, 109.38660, 686.45020,
796.71201, 249.80338, 522.54733, 385.94572, 353.18030, 188.26056, -301.37340)
breaks <- c(-540, -168, -45, 0, 401.4255, 816.6361, 1650, 2201.2766)
group_by_breaks(x, breaks)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.