Skip to content
Prev 318361 / 398503 Next

cut a vector in equal parts

Insert "include.lowest=TRUE" or the lowest value will get dropped (assigned
NA):

split(x, cut(x, quantile(x, probs = seq(0, 1, by = 0.2)),
include.lowest=TRUE))

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352