On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote:
I'm trying to manipulate/change a formula prior to passing it to another function. A simplified example:
User passes formula to my function: y~x My function does: lm(transform(y)~x)
Here, transform() is added to the model's response.
What is the best way to accomplish this?
One way is
formula[[2]]<-substitute(transform(y),list(y=formula[[2]]))
-thomas
______________________________________________ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel