From hadley at rice.edu  Sat Oct  2 13:57:32 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Sat, 2 Oct 2010 06:57:32 -0500
Subject: [Rd] Eval and the enclos argument
Message-ID: <AANLkTinQ8fXByLEkJqCFOr9i4Q5KNSnf2cfAD0vBJy-6@mail.gmail.com>

Hi all,

I'm trying to understand the default value of the enclos argument of eval:

  enclos = if(is.list(envir) || is.pairlist(envir)) parent.frame()
else baseenv()

Why isn't it just

  enclos = parent.frame()

given that enclos is only meaningful (given my reading of the
documentation) when envir is not an environment already.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Eval and the enclos argument
Hadley Wickham