user ignored an informative warning message (was ts.intersect bug?)
On Wed, 21 Sep 2005, Antonio, Fabio Di Narzo claimed:
This code gives an error: a <- ts(1:10, start=0, freq=10) b <- ts(1:10, start=1, freq=10) ts.intersect(a,b)
In reality, it gives a helpful warning:
ts.intersect(a,b)
NULL Warning message: non-intersecting series in: .cbind.ts(list(...), .makeNamesTs(...), dframe = dframe, union = FALSE) Your two series have no time points in common, see
time(a)
Time Series: Start = c(0, 1) End = c(0, 10) Frequency = 10 [1] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
time(b)
Time Series: Start = c(1, 1) End = c(1, 10) Frequency = 10 [1] 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 or try
ts.union(a,b)
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