[Rd] Questions about calls and formulas

Erich Neuwirth erich.neuwirth at univie.ac.at
Tue Aug 23 01:35:24 CEST 2005

> Try do.call like this:
> ff <- x ~ g*h
> do.call("substitute", list(ff, list(x = as.name("weight"))))

It is even more complicated.
All I know is that ff is a formula with an expression on the left hand
side. This expression needs to be replaced by "weights".
According to the documentation, substitute only handles
replacement of variables by something else,
and that is not enough in my case.

Erich Neuwirth, Didactic Center for Computer Science
University of Vienna
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39902 Fax: +43-1-4277-9399

More information about the R-devel mailing list