[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] transfer string to expression
From:       Duncan Murdoch <murdoch.duncan () gmail ! com>
Date:       2010-10-31 20:58:15
Message-ID: 4CCDD867.2030001 () gmail ! com
[Download RAW message or body]

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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic