Skip to content
Prev 169250 / 398506 Next

counting entries in vector

Its not clear whether c("bb", "bb", "aa", "aa", "bb") can occur
or if it can how it should be handled but this gives the lengths
of each run and so would give c(2, 2, 1) in that case (as opposed
to c(3, 2)):

rle(k)$lengths
On Wed, Feb 4, 2009 at 10:19 AM, axionator <axionator at gmail.com> wrote: