powered by
Run length encoding with indices
index_runs(x, zero_index = FALSE)
A data frame with information about the runs and start/stop indices
vector of values on which to perform run length encoding
logical. Should indices be indexed from zero (useful for Rcpp)?
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))
Run the code above in your browser using DataLab