[R] counting a sequence of charactors or numbers

Joe Byers joe-byers at utulsa.edu
Sun Oct 1 00:13:25 CEST 2006


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



More information about the R-help mailing list