[R] Search a function name in a string
ligges at statistik.uni-dortmund.de
Tue Jul 3 17:43:38 CEST 2007
NOEL Yvonnick wrote:
> I am trying to find a function name in a string that expresses a
> functional form :
> > s = "blabla...S(var)...blabla"
> I would like to detect the pattern "S(*)" in s.
> I am no guru at regular expressions. Just tried :
> > grep("S(.*)",c("S(a)","CSP"))
>  1 2
> I expected the pattern to be retrieved only in the first string, so
> obviously this is not correct. Any idea ?
> Thank you very much in advance,
> Yvonnick Noel, PhD
> U. of Rennes 2
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help