The output from strsplit("hello","") is not suitable as input for the second argument for charmatch.
compare with: charmatch("o",strsplit("hello","")[[1]]) -- View this message in context: http://n4.nabble.com/Matching-a-character-in-a-string-tp1289795p1289976.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org 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.