[R] rle for non concecutive

Joshua Wiley jwiley.psych at gmail.com
Mon Oct 31 10:34:30 CET 2011


On Mon, Oct 31, 2011 at 2:29 AM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
> I would like to task you if you know a rle version that can work also in a non consecutive way too.

You mean just a counter for an objects occurence?

like: A B A A B B C would give 1 1 2 3 2 3 1?

I am not clear what non consecutive runs are exactly.

Cheers,

Josh

>
> B.R
> Alex
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-help mailing list