[R] grep TRUE/FALSE

Ana rrasterr at gmail.com
Wed Jan 25 12:28:24 CET 2012


Is there a way to get a TRUE/FALSE condition as result, when using grep ?

c="The file will be updated"

if grep("updated",c)==1 then I get TRUE

but

How can I deal with grep("new",c) ? it gives integer(0)


Thanks in advance.



More information about the R-help mailing list