[R] counting a sequence of charactors or numbers

From: Joe Byers <joe-byers_at_utulsa.edu>
Date: Sat 30 Sep 2006 - 22:13:25 GMT


I have the following sequence of characters. These could be integers as well. For this problem, only two values are valid.

S S S S S S W W W W W W W W S S S S S S S S W W W W W W W W S S S S S S S S S S S S S W W W W W W W W W

I need to determine the count of the classes/groups in sequence. as 6,8,8,8,13,9 where the sum of these equal my total observations.

Any help is greatly appreciated.

Thank you
Joe



R-help@stat.math.ethz.ch 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. Received on Sun Oct 01 08:17:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 30 Sep 2006 - 22:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.