From tpapp at Princeton.EDU  Thu Jul 27 14:16:13 2006
From: tpapp at Princeton.EDU (Tamas K Papp)
Date: Thu, 27 Jul 2006 14:16:13 +0200
Subject: [Rd] how to start local scope?
Message-ID: <20060727121613.GA4594@pu100877.student.princeton.edu>

How can I start a local scope inside an R function?  Eg in

> b
Error: object "b" not found
> f <- function() {
+   {
+     b <- 1
+   }
+   b+2
+ }
> f()
[1] 3

I would like f() to report an error, not finding b.  I am thinking
about something like let in Scheme/Lisp.

Thanks,

Tamas



[Rd] how to start local scope?
Tamas K Papp