On Tue, 29 Jan 2008, Pedro Mardones wrote: > Dear all; > > What can be wrong with this simple example? > > library(boot) > d1<-c(rnorm(10,mean=10)) > fm<-function(d,i) mean(d[i]) > bd1<-boot(d1,fm,10000) > >> Error: evaluation nested too deeply: infinite recursion / >> options(expressions=)?
Let's try a more readable version: set.seed(123) # for reproducibility library(boot) d1 <- rnorm(10, mean=10) fm <- function(d, i) mean(d[i]) bd1 <- boot(d1, fm, R=10000) I don't see anything wrong with that, and nor does my version of R (2.6.2 alpha). Please note the request in the R posting guide for 'at a minimum' the ouptut of sessionInfo(). > > Thanks for any idea > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

