> grep("o", "hello")
Thanks, I hadn't noticed R has grep included!
--
Fabrice DELENTE
__
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 pr
See also ?unlist (you can unlist(strsplit(...)) for the same effect
--
View this message in context:
http://n4.nabble.com/Matching-a-character-in-a-string-tp1289795p1290011.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pro
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 maili
Fabrice DELENTE wrote:
Hello.
Sorry for this very basic question but I didn't find (of didn't understand)
the answer either in the help or in the online guide.
I have a string, let's say "hello". I want to know if there is some
character in it, let's say an 'o'.
I tried
charmatch("o", str
Hello.
Sorry for this very basic question but I didn't find (of didn't understand)
the answer either in the help or in the online guide.
I have a string, let's say "hello". I want to know if there is some
character in it, let's say an 'o'.
I tried
> charmatch("o", strstplit("hello",""))
but it
5 matches
Mail list logo