I have some data in a list that I need to look for continuous runs of integers (My brain thinkrle but don\'t know how to use it here).
rle
It\'s easier to l
Late to the party, but here's a deparse based one-liner:
deparse
lapply(z,function(x) paste(sapply(split(x,cumsum(c(1,diff(x)-1))),deparse),collapse=", ")) $greg [1] "7:11, 20:24, 30:33, 49L" $researcher [1] "42:48" $sally [1] "25:29, 37:41" $sam [1] "1:6, 16:19, 34:36" $teacher [1] "12:15"