counting a sequence of charactors or numbers
?rle url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Champaign, IL 61820
On Sep 30, 2006, at 5:13 PM, Joe Byers wrote:
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 at 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.