[R] Testing for existence of object within a function

Gabor Grothendieck ggrothendieck at gmail.com
Fri Oct 8 22:25:41 CEST 2010


On Fri, Oct 8, 2010 at 4:05 PM, Eli Holmes <e2holmes at gmail.com> wrote:
> I'm still trying to sort out if I can tell the function not to use
> values in the user workspace if they don't exist locally in a
> function, i.e. a "use local variables only" option when defining a
> function. Obviously, I could go to a style of programming where
> I define all local function variables at the top of my function and
> set them, somehow, to a value that will crash the code if I forget to
> reset them later in the function, but it would be easier if I could
> tell the function not to look for variables in the user workspace.

See the discussion in the February 27, 2010 news item on the proto home page:
http://r-proto.googlecode.com


-- 
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