Dear list members,
I am seeking a function that returns me the length of a continous
sequence of identical elements in a vector. Something like (or similar to):
example = c(1,1,1,2,2,3,3,3,3)
result = c(3,3,3,2,2,4,4,4,4)
I am quite sure there already exists a function to do this, I just cant
figure out its name. Otherwise I would start programming my own function.
Best
Jannis
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.