Description Usage Arguments Examples
returns the position of the first non-zero stretch of elements. gaps shorter than 'gap' do not interrupt a stretch.
1 | stretches(input, gap, what, zero.surrounded)
|
input |
a vector of numerical values. |
gap |
the smallest sequence of NA or zeroes that will interrupt a stretch. defaults to 1 (sequences must be contiguous). |
what |
character; if '"start"', finds where stretches start. if '"end"', finds where stretches end. defaults to '"start"'. |
zero.surrounded |
logical; if 'TRUE', assumes infinite zeroes leading and trailing the input vector. |
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.