The function seqpack converts vectors of arbitrary indices into a matrix with row items from, to and by. Sequences within the input vector are automatically detected.
Usage
seqpack(x)
Arguments
x
a vector containing indices, i.e. integers.
Value
A matrix with row items from, to and by. The sub-sequences (and single indices) are given in the column in the same order that they appear in the input.
Details
Extracting a subset of an ff object results in R to C calls. In order to avoid calling overhead resulting from a sequential processing of the indices, the indices of the subset are analysed and converted by seqpack. This way, an extraction of arbitrary sequences involves only a single R to C call. This feature is currently only implemented for ff objects.