Splits a vector into consecutive segments at specified positions.
Details
The function splits x into consecutive chunks defined by pos.
Internally, positions are sorted, duplicates are removed, and values that
would not produce a non-empty segment (pos < 2 or
pos > length(x)) are ignored. Empty segments are never returned.
Each element of the returned list corresponds to a contiguous subset of
x. The first segment always starts at position 1.
See also
Other data.reshape:
collapseTable(),
long-wide-reshape,
splitX(),
untable()
