Skip to content
Prev 9880 / 63424 Next

acf inherits problem

It's not the same problem as was fixed for 1.7.0, which was 
namespace-related.  It's clearer if you do

z <- as.ts(matrix(rnorm(100), , 1))
class(z)
pacf(z)

The problem is that you have an n x 1 matrix as a time series. That _is_
somewhat silly, and avoiding that avoids the problem (and it does not 
occur in any of our test suites, unsurprisingly).

I think as.ts/ts ought to drop() such matrices.

The test

    if (is.matrix(x)) 
 
has always been wrong in that case: it should be 

    if (is.matrix(x) && ncol(x) > 1)

The problem has long been there, just the wrong method was called and
coped in the past.

I've put a fix in R-patched.
On Wed, 18 Jun 2003, Paul Gilbert wrote: