index_runs | R Documentation |
Run length encoding with indices
index_runs(x, zero_index = FALSE)
x |
vector of values on which to perform run length encoding |
zero_index |
logical. Should indices be indexed from zero (useful for Rcpp)? |
A data frame with information about the runs and start/stop indices
x <- c( FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE ) head(index_runs(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.