SplitAt {DescTools} | R Documentation |
Split a Vector Into Several Pieces at Given Positions
Description
Split a vector into several pieces at given positions.
Usage
SplitAt(x, pos)
Arguments
x |
the vector to be splitted. |
pos |
integer vector, giving the positions at which the vector should be splitted. |
Value
a list with the splitted parts of x.
Author(s)
flodel (on StackOverflow)
References
https://stackoverflow.com/questions/16357962/r-split-numeric-vector-at-position
See Also
Examples
x <- 1:10
SplitAt(x, pos=c(3, 8))
[Package DescTools version 0.99.55 Index]