Description Usage Arguments Details Value Examples
This function takes a series of boolean values and returns a list of integers of the same length corresponding to the lengths at the ends of sequences of TRUE values.
1 | get.series.lengths.at.ends(x, na.value = FALSE)
|
x |
Sequence of booleans. |
na.value |
Value to replace NAs with. |
It can often be useful to know how long a series of boolean values is. This function provides a method of knowing where and how long such sequences are.
A vector consisting of the lengths of sequences of TRUE values at the location of the last TRUE value in the sequence, and zeroes elsewhere.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.