powered by
Factor to Segments
fac2seg(fac)
A list of vectors, each vector contains the indices of the elements of the corresponding segment
A factor where each level represents a segment
fac <- factor(c("a", "b", "a", "b", "c", "c")) fac2seg(fac)
Run the code above in your browser using DataLab