Learn R Programming

IceCast (version 2.1.0)

contig_zero: Find indices of sequences of contiguous zeros

Description

Identify the indices of sequences of repeated zero values and indices of sequences of non-zero values

Usage

contig_zero(y)

Arguments

y

vector to consider

Value

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.