On 31/10/2010 4:47 PM, Wu Gong wrote:

Hi Duncan:

I'm curious about the environment setting. ?eval says:

"If envir is not specified, then the default is parent.frame() (the
environment where the call to eval was made). "

So what's the difference between set envir=parent.frame() or not?

If you pass parent.frame() as an argument, it will be one level up: it's the parent of the function that calls eval. If you leave it at the default, it's the parent of eval, i.e. the function that calls it.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to