Identify the indices of sequences of repeated zero values and indices of sequences of non-zero values
contig_zero(y)
vector to consider
Matrix of three columns where each row gives the first and last index
of a sequence of numbers. The third column is a boolean. If
TRUE
, the indices are for a sequence zeros. If FALSE
,
the indices are for a sequence non-zero values.