Thanks to all for the helpful explanation.
Regards
Saptarshi
On Fri, Jul 17, 2009 at 12:42 AM, wrote:
> 'startgiven' is in the environment of your function 'incr' (which is what
> your function 'a' becomes). It might be more transparent to define your
> function with an enclosing local environ
'startgiven' is in the environment of your function 'incr' (which is what your
function 'a' becomes). It might be more transparent to define your function
with an enclosing local environment explicitly, for example:
> b <- local({
+ startgiven <- 0
+ function(n) {
+ if(!missing(n)) {
+
On Fri, Jul 17, 2009 at 9:15 AM, Saptarshi Guha wrote:
> Hello,
> I tried this pseudo-generator style experiment (see below). The "<<-"
> operator assigns to in the calling environment which would be the
> environment of "getN".
Yes.
> Yet when the function incr is returned, isn't this environme
3 matches
Mail list logo