Dear R-help,
Why does the second grep reject when the first grep accepts?
Why does regexpr accept what grep rejects?
eqtn
[1] "(1.2*A%*%B)/2"
if(grep("A\\%\\*\\%B",eqtn)==1)erind<-1
if(grep("A\\%\\*\\%A",eqtn)==1)erind<-1
Error in if (grep("A\\%\\*\\%A", eqtn) == 1) erind <- 1 :
missing value where logical needed
if(regexpr("A\\%\\*\\%A",eqtn)==1)erind<-1
TIA
graham lawrence
______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help