Description Usage Arguments Value Author(s) Examples
This function groups a set of sorted indices. For example: 1,2,3,50,100,101,102,103 would be grouped as follows: 1-3, 50, 100-103.It is used internally.
1 | groupIndices(rawIndices)
|
rawIndices |
The indices |
It returns a data frame. Each row corresponds to a group. The columns are: initial index, final index and group length.
Marina Saez Andreu
1 2 3 | X <- sort(sample(1:50,25))
X
groupIndices(X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.