From: Pascal Boisson <Pascal.Boisson_at_scri.ac.uk>

Date: Fri 29 Apr 2005 - 07:12:47 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 29 07:15:55 2005

Date: Fri 29 Apr 2005 - 07:12:47 EST

I have some trouble in reconstructing a valid expression within a
function,

here is my question.

tabsub<-deparse(substitute(subset))

dDF<-deparse(substitute(DF))

if (tabsub[1]!="TRUE") {

subset<-paste(dDF,"$",tabsub,sep="")}

#At this point, I have a string that seems to be the expression that I

want

sDF<-subset(DF, subset)

}

#But I have an error message :

>Error in r & !is.na(r) : operations are possible only for numeric or
logical types

I can not understand why is that, even after I've tried to convert
properly the string into an expression.

I've been all the day trying to sort that problem ...
Maybe this attempt is ackward and I have not understood what is really
behind an expression.

But if anyone could give me a tip concerning this problem or point me to
relevant references, I would really appreciate.

Thanks

Pascal Boisson

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

**DISCLAIMER:\
**

\ This email is from the Scottish Crop Researc...{{dropped}}

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 29 07:15:55 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:31:28 EST
*