[R] question mle again

Gabor Grothendieck ggrothendieck at gmail.com
Mon Feb 7 19:13:03 CET 2011


On Mon, Feb 7, 2011 at 1:01 PM, Joshua Wiley <jwiley.psych at gmail.com> wrote:
> On Mon, Feb 7, 2011 at 9:40 AM, Bert Gunter <gunter.berton at gene.com> wrote:
>> On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley <jwiley.psych at gmail.com> wrote:
>>> Hi,
>>> When a function cannot find a variable inside its own environment, it
>>> will look to its parent environment.
>>
>>
>> This is false. It will "look to" its **enclosing environment" /
>> "enclosure" . See
>> ?environment
>
> Thank you for the correction, Bert.  I had always interpreted:
>
> "If one follows the 'parent.env()' chain of enclosures back far
>  enough from any environment, eventually one reaches the empty
>  environment."
>
> to mean the parent environment was basically synonymous with the
> enclosure.  I re-read ?environment, but I think I am still missing
> something, so if I may ask a follow up question, would you explain or
> suggest additional places to look for when/how is the the parent
> environment distinct from the enclosing environment?
>

I am not so sure that there really is uniform usage here although
specific people may have specific preferences.

Because R uses parent.env and parent.frame functions many people use
the term parent environment to refer to the what parent.env returns
and parent frame to refer to what parent.frame returns and that seems
reasonable usage as well.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list