You have to let boot pass the index for selection to the function as well. So, for example, try:
boot.mean <- function(data, index) mean(data[index]) results <- boot(x, boot.mean, R=5) Andrew. On Thursday 01 April 2004 14:19, Morris, Jeffrey [OCDUS] wrote: > What in the world am I missing?? > > > x<-rnorm(20) > > > > mean(x) > > [1] -0.2272851 > > > results<-boot(x,mean,R=5) > > > > results[2] > > $t > [,1] > [1,] -0.2294562 > [2,] -0.2294562 > [3,] -0.2294562 > [4,] -0.2294562 > [5,] -0.2294562 > > Jeff Morris > Ortho-Clinical Diagnostics > A Johnson & Johnson Co. > Rochester, NY > Tel: (585) 453-5794 > > > [[alternative HTML version deleted]] > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html -- Andrew Robinson Ph: 208 885 7115 Department of Forest Resources Fa: 208 885 6226 University of Idaho E : [EMAIL PROTECTED] PO Box 441133 W : http://www.uidaho.edu/~andrewr Moscow ID 83843 Or: http://www.biometrics.uidaho.edu No statement above necessarily represents my employer's opinion. ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html