Counts maximal consecutive blocks of equal values in a non-empty binary
sequence. For example, 00110 contains the runs 00, 11, and 0.
Examples
count_runs(c(0, 0, 1, 1, 0))Counts maximal consecutive blocks of equal values in a non-empty binary
sequence. For example, 00110 contains the runs 00, 11, and 0.
count_runs(c(0, 0, 1, 1, 0))