Date: 18 Mar 2004 23:52:47 +0100
From: Peter Dalgaard <p.dalgaard at biostat.ku.dk>
To: <ggrothendieck at myway.com>
Cc: <p.dalgaard at biostat.ku.dk>, <tlumley at u.washington.edu>, <tplate at blackmesacapital.com>, <R-help at stat.math.ethz.ch>
Subject: Re: [R] substitute question
"Gabor Grothendieck" <ggrothendieck at myway.com> writes:
From: Peter Dalgaard <p.dalgaard at biostat.ku.dk>
(The real pain in these examples is that substitute autoquotes its
expr argument. Therefore, when you want to modify an expression that
is already stored in a variable, you need an extra outer layer of
eval(substitute(...)) to poke the content of the variable into the
inner substitute. An "esub" function with standard evaluation
semantics would make this much easier.)
That is one of the frustrations of using substitute.
The other is that even if you do perform two levels of substitute,
as I have been trying, you still can't count on it working for
an arbitrary unevaluated expression, as my examples show.
Er, I don't think so. All I have seen is a couple of cases where you
tried to pass something that was not a language object (e.g. a
function as opposed to an expression or call generating a function.)