Displaying 1 result from an estimated 1 matches for "tp3385230p3385230".
2011 Mar 17
2
Scope and apply-type functions
...es so that the first function defined
actually uses the last value of the variable?
> a = list();for (k in 1:5){a = c(a,function(){k})}
> a[[1]]()
[1] 5
>
Or is there something else entirely?
--
View this message in context: http://r.789695.n4.nabble.com/Scope-and-apply-type-functions-tp3385230p3385230.html
Sent from the R help mailing list archive at Nabble.com.