Skip to content
Prev 132678 / 398506 Next

Understanding eval

Duncan has already pointed out that consideration of promises is
what is missing in the description but in addition the way lm and
other functions in R get around it is to use match.call like this:

bar2 <- function(er) {
	mc <- match.call()
	mc[[1]] <- as.name("foo")
	names(mc)[[2]] <- "expr"
	eval.parent(mc)
}
bar2(a)
On Dec 22, 2007 3:30 PM, Charilaos Skiadas <cskiadas at gmail.com> wrote: