[R] Bootstrap memory use?

Matthew Vernon m.c.vernon at warwick.ac.uk
Wed Mar 16 17:27:17 CET 2011


Hi,

the boot function from the "boot" library seems to use an implausible
quantity of memory; is this to be expected, or am I doing something
wrong? Specifically, the vector I wish to bootstrap off is about 17000
entries long

length(fes)
[1] 16988
bm <- function(x,indexes) mean(x[indexes])

then if I do, eg:

b <- boot(fes,statistic=bm,R=10000)

then R fairly rapidly shoots up to using about 40% of the RAM on this
machine (which has 12G of the stuff). If I up the replications to say
50,000, then it chews all the available system memory and brings my
computer to a grinding halt. I can see that that's probably far too many
bootstrap resamplings, but I can't see why it needs so much memory...

Regards,

Matthew

-- 
Matthew Vernon, Research Fellow
Ecology and Epidemiology Group,
University of Warwick
http://blogs.warwick.ac.uk/mcvernon



More information about the R-help mailing list