get_streaks | R Documentation |
Computes the lengths of all streaks of 1's in a vector of binary observations (0's and 1's)
get_streaks(x)
x |
vector of 0's and 1's |
vector of lengths of streaks
Jim Albert
y <- c(0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0)
get_streaks(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.