Re: [Rd] Questions about calls and formulas

From: Erich Neuwirth <erich.neuwirth_at_univie.ac.at>
Date: Mon 22 Aug 2005 - 23:35:24 GMT

> 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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue Aug 23 09:39:23 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:18 GMT