RE: [R] ts.intersect a multivariate and univariate ts

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 06 Jun 2005 - 23:54:58 EST

On Mon, 6 Jun 2005, Andy Bunn wrote:

>>>
>>> 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")

Actually, that is not quite the case: logical time series are allowed, even through not documented to be allowed. (The S4 methods start-up code generates one, and so a similar check which was once there was removed.)

-- 
Brian D. Ripley,                  ripley@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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jun 07 00:49:48 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:23 EST