[R] ts.intersect a multivariate and univariate ts

Andy Bunn abunn at whrc.org
Mon Jun 6 14:19:10 CEST 2005


> > 
> > R > w <- list(rnorm(10), rnorm(10))
> > R > x <- ts(w, start = 1980)
> 
> Even though you don't get an error message this statement is 
> erroneous.  ?ts discusses the valid possibilities.

So it does, might I suggest add something like this to ts:
    if (is.list(data)) 
       stop("Data must be a numeric vector or matrix")


Thanks all for the clarifications and discussion,
Andy




More information about the R-help mailing list