Paul Gilbert wrote:
I think this is a bug, but perhap someone could confirm that it is not just me doing something stupid. (I vaguely recall something like this previously getting fixed in 1.7.0.)

R : Copyright 2003, The R Development Core Team
Version 1.7.1  (2003-06-16)


z <-matrix(rnorm(100), 100,1)
acf(as.ts(z), type="partial")

Error in inherits(x, "ts") : evaluation is nested too deeply: infinite recursion?

I can can confirm that it's a bug the 1.8 development branch, but not in 1.7.0. (I don't have a 1.7.1 on this machine at present.) The problem seems to be in the acf.R in the ts library.


1.7.1, 1.8.0 etc. have

<     if(is.matrix(x))
<         return(pacf(as.ts(x), lag.max=lag.max, plot=plot,
<                     na.action=na.action, ...))

while 1.7.0 has.

>     if(is.matrix(x)) {
>         m <- match.call()
>         m[[1]] <- as.name("pacf.mts")
>         return(eval(m, parent.frame()))
>     }

If I had to guess, I'd say that the call to the generic from a method is producing a loop.

--
Ross Ihaka                         Email:  [EMAIL PROTECTED]
Department of Statistics           Phone:  (64-9) 373-7599 x 85054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to