Skip to content
Prev 169249 / 398506 Next

Large file size while persisting rpart model to disk

On 2/4/2009 10:57 AM, luke at stat.uiowa.edu wrote:
An alternative could be x <- NULL.  This keeps the disadvantage of 
possibly messing up subsequent expressions, but it shrinks the allocation.
Of course that's a good way to control what gets captured, but I find it 
makes things harder to understand.  I think you've been working with 
closures and lexical scope for quite a few years more than me so this 
error wouldn't happen to you, but I'd be worried that I'd end up with 
two differing copies of y in some later revision of the code.

For example, my version could put the noneedforx definition at the top 
of the function and it would still work; yours needs to put it after the 
last change to y.

Duncan Murdoch