Mahieux Dimitri wrote:
>
> I would know if it is possible with grep to match a exact string. For
> example, I want to match the string "DP2" (and only this) and grep match
> "DP2BS" too.
> I have sought in the grep help but I didn't find what I want.
>
grep("DP2", {other arguments}, fixed=TRUE)
?grep says that "fixed is logical. If TRUE, pattern is a string to be
matched as is. Overrides all conflicting arguments."
--
View this message in context:
http://www.nabble.com/-R--Exact-matching-with-grep-tf3174076.html#a8805966
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.