Last chance! 50% off unlimited learning
Sale ends in
Split a vector into several pieces at given positions.
SplitAt(x, pos)
the vector to be splitted.
integer vector, giving the positions at which the vector should be splitted.
a list with the splitted parts of x.
https://stackoverflow.com/questions/16357962/r-split-numeric-vector-at-position
# NOT RUN {
x <- 1:10
SplitAt(x, pos=c(3, 8))
# }
Run the code above in your browser using DataLab