From erich.neuwirth at univie.ac.at  Tue Aug 23 01:35:24 2005
From: erich.neuwirth at univie.ac.at (Erich Neuwirth)
Date: Tue, 23 Aug 2005 01:35:24 +0200
Subject: [Rd] Questions about calls and formulas
In-Reply-To: <971536df050822155550243049@mail.gmail.com>
References: <430A4629.8010506@univie.ac.at>	<40e66e0b05082214525e2140e8@mail.gmail.com>	<430A556E.4080203@univie.ac.at>
	<971536df050822155550243049@mail.gmail.com>
Message-ID: <430A613C.5020705@univie.ac.at>

> 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



[Rd] Questions about calls and formulas
Erich Neuwirth