Consider the following example:

# substitute a with b in the indicated function. Seems to work.
> z <- substitute( function()a+1, list(a=quote(b)) )
> z
function() b + 1

# z is an object of class call so use eval
# to turn it into an object of class expression; however,
# when z is evaluated, the variable  a  returns.  
> eval(z)
function()a+1

Why did  a  suddenly reappear again after it had already been replaced?

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to