[R] How to save boot objects?

Hans Gardfjell hans.gardfjell at eg.umu.se
Thu Oct 25 18:12:24 CEST 2001


Hi,

I have problem with saving and later sourcing boot objects. A short
familiar example...

R : Copyright 2001, The R Development Core Team
Version 1.3.1  (2001-08-31)
...

> library(boot)
> data(city)
> ratio <- function(d, w)
+ sum(d$x * w)/sum(d$u * w)
> boot.res<-boot(city, ratio, R=999, stype="w")
> dump("boot.res","boot.res.R")
>
Save workspace image? [y/n/c]: n
hans at poa:~/seedtest$ R

R : Copyright 2001, The R Development Core Team
Version 1.3.1  (2001-08-31)...

> source("boot.res.R")
Error in structure(list(t0 = 1.5203125, t =
structure(c(1.24632352941176,  :
        couldn't find function "boot"
>
When sourcing the boot object it seems that if R is rerunning the
bootstrap procedure again.

My plan was to run  several boot commands from within a battchfile on a
remote server. "Dumping" them and later pick them up and calculate CI
etc. Why is dump/source behaving like this on boot objects? Does anyone
of you have a better suggestion than using dump for saving boot objects?

Thanks,

Hans Gardfjell
Umeå University



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list