SplitAt {DescTools} | R Documentation |
Split a vector into several pieces at given positions.
SplitAt(x, pos)
x |
the vector to be splitted. |
pos |
integer vector, giving the positions at which the vector should be splitted. |
a list with the splitted parts of x.
flodel (on StackOverflow)
https://stackoverflow.com/questions/16357962/r-split-numeric-vector-at-position
x <- 1:10
SplitAt(x, pos=c(3, 8))