R/S compatibility in passing a formula

Douglas Bates bates@stat.wisc.edu
Sat, 10 Apr 1999 17:05:35 -0500 (CDT)

In S3 if you are passing an evaluated formula to another function that
will store it and use it in printing (such as a model-fitting function), you
usually want to unclass the formula.  Otherwise, the formula that gets
stored looks very ugly when printed.  A trick to do the unclassing is to pass
 form = c( myFormula )
In R this has the effect of making form a list rather than a call.  It
seems that passing
 form = as.vector( myFormula )
will work in both dialects.  Anyone else have experience with this?
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch