library(stringr)ex_str <- "This.is.a.string" str_count(ex_str, fixed('.'))
Standard input is empty
[1] 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!