Bugzilla – Bug 14925
window.ts() fails with mts arguments
Last modified: 2012-05-23 13:23:10 UTC
window.ts()<- fails with an error message "too many replacement values supplied" when the argument and replacement value are multiple time series objects, even though it works properly if single-series columns of the same objects are selected.
My R version is svn revision 58871, 64-bit linux, 2012-3-30.
Code to reproduce:
a <- ts(matrix(1:36, 12), start=2000, freq=12)
b <- ts(matrix(1:48, 16), start=c(1999,9), freq=12)
window(a, start=c(2000,6)) <- window(b, start=c(2000,6), end=c(2000,12))
## line above generates error message
window(a[,2], start=c(2000,6)) <- window(b[,3], start=c(2000,6), end=c(2000,12))
In fact only the error message is wrong: the code later works.
Fixed for 2.15.0 patched (and please if you are going to report on R-patched, do it on a current version).