Description Usage Arguments Details Value Author(s) Examples
This function finds sequences of consecutive numbers in numeric vectors
1 |
vector |
A numeric vector to be analyzed |
Out of the following vector: 1,2,3,4,5,6,7,20,21,140,141 the function will find values starting the sequences: 1,20,140 and their lengths 7,2,2 respectively
values |
A vector of values starting the consecutive sequences |
lengths |
A vector of lengths of identified sequences |
Michal Stolarczyk & Alicja Pluciennik
1 | find_consecutive_seq(c(1,2,3,4,5,6,7,20,21,140,141,300,301,302))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.