[R] Number of occurences of a character in a string

Santosh Srinivas santosh.srinivas at gmail.com
Mon Oct 11 06:18:20 CEST 2010


New to R ... which is a function to most effectively search the number of occurrences of a character in a string?

b <- c("jkhrikujhj345hi5hiklfjsdkljfksdio324j';;'lfd;g'lkfit34'5;435l;43'5k")

I want the number of semi-colons ";" in b?

Thanks.



More information about the R-help mailing list