[R] substitute question

Thomas Lumley tlumley at u.washington.edu
Fri Mar 19 02:29:52 CET 2004


On Thu, 18 Mar 2004, Gabor Grothendieck wrote:
>
> 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.
>

Yes, I am sure.

It's not that it is invalid to have a function as the first argument of
substitute, it's that substitute() does not recurse into either the body
or the formal arguments of the function (or into the environment, though
no-one would expect that).


	-thomas




More information about the R-help mailing list