Re: [R] grepl

2013-05-13 Thread Francesco Isotta
Thanks so much for your help, now I could solve the problem (using [.])! 2013/5/13 arun > You may also try: > grepl("[.]",c("ad.1","ads","ad.2")) > #[1] TRUE FALSE TRUE > A.K. > > > > - Original Message - > From: Francesco Isotta > To: r-help@r-project.org > Cc: > Sent: Monday, May 1

Re: [R] grepl

2013-05-13 Thread arun
You may also try: grepl("[.]",c("ad.1","ads","ad.2")) #[1]  TRUE FALSE  TRUE A.K. - Original Message - From: Francesco Isotta To: r-help@r-project.org Cc: Sent: Monday, May 13, 2013 4:19 AM Subject: [R] grepl Hello, it is not clear to me, how to search if in a string there is a "." (f

Re: [R] grepl

2013-05-13 Thread Duncan Murdoch
On 13-05-13 4:19 AM, Francesco Isotta wrote: Hello, it is not clear to me, how to search if in a string there is a "." (full stop). Using: grepl(".",string) doesn't work because the full stop it is a metacharacter (it gives "TRUE" also if no full stop is in the character). Use grepl(".", stri