
Any better solution than this ? 
 
sum(strsplit("TCGGGGGACAATCGGTAACCCGTCT", "")[[1]] == "G")
_________________________________________________________________


	[[alternative HTML version deleted]]

