Bug 14925 - window.ts() fails with mts arguments
window.ts() fails with mts arguments
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Accuracy
R 2.15.0 patched
x86_64/x64/amd64 (64-bit) Linux
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-20 03:05 UTC by Chris Sims
Modified: 2012-05-23 13:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Sims 2012-05-20 03:05:01 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)
a
b
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))
a
Comment 1 Brian Ripley 2012-05-23 13:23:10 UTC
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).