[R] text search in r

rnewbie565 amy.jacobson2 at gmail.com
Thu Aug 2 23:27:19 CEST 2012


I am trying to count the number of times that the characters in a string
change
For example-
new=c(AAAABBBBBABBBABB)
I want to find the number of times that B changes to A and the number of
times that A changes to B. I tried the grep command but I only figured out
the positions of when B changes to A when I only need the number of times it
occurs.




--
View this message in context: http://r.789695.n4.nabble.com/text-search-in-r-tp4638961.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list