[R] error message + boot library
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jan 29 06:58:43 CET 2008
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
>
> ______________________________________________
> R-help at r-project.org 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, ripley at stats.ox.ac.uk
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
More information about the R-help
mailing list