[R] substitute question

Gabor Grothendieck ggrothendieck at myway.com
Fri Mar 19 02:17:09 CET 2004


Date:   Thu, 18 Mar 2004 15:56:59 -0800 (PST) 
From:   Thomas Lumley <tlumley at u.washington.edu>
>  
> On Thu, 18 Mar 2004, Gabor Grothendieck wrote:
> > (1) One can either pick apart the function using body, or
>
> Actually, I think this is fairly natural -- it is only body(f) 
> that is an
> expression. Certainly substitute() could have been written to 
> operate on
> functions as well, but it wasn't.

In the context of R, natural is performing operations on whole
objects at once.  Its the same difference as indexing vs. vector
operations.

I am not sure where this came from about not operating on functions.
Are you sure?  I know just about everyone is saying this but
the help page does not refer to that and the 
example I gave where we do use list(f=f) for f a function does
seem to expand properly (see my last posting) although 
the subsitution never appears to take effect.




More information about the R-help mailing list