Skip to content

another multivariate ts bug

2 messages · Paul Gilbert, Peter Dalgaard

#
I think this is another one of the same kind of bugs in ts:

Version 0.64.1  (May 8, 1999)
...
Error: invalid time series parameters specified
Paul

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
Sigh.

Found and fixed. Same problem. This time in src/main/logic.c, lbinary
function. Here's the patch (cut+paste'd, watch out for whitespace
problems).

RCS file: /users/rdev/R/CVS-ARCHIVE/R/src/main/logic.c,v
retrieving revision 1.8
diff -c -r1.8 logic.c
*** logic.c     1999/03/05 19:19:04     1.8
--- logic.c     1999/05/11 21:02:09
***************
*** 110,121 ****
      y = CADR(args) = coerceVector(y, LGLSXP);
      PROTECT(x = binaryLogic(PRIMVAL(op), x, y));
  
-     if (xts || yts) {
-       setAttrib(x, R_TspSymbol, tsp);
-       setAttrib(x, R_ClassSymbol, class);
-       UNPROTECT(2);
-     }
- 
      if (dims != R_NilValue) {
        setAttrib(x, R_DimSymbol, dims);
        if(xnames != R_NilValue)
--- 110,115 ----
***************
*** 128,133 ****
--- 122,133 ----
            setAttrib(x, R_NamesSymbol, xnames);
        else if(length(x) == length(ynames))
            setAttrib(x, R_NamesSymbol, ynames);
+     }
+ 
+     if (xts || yts) {
+       setAttrib(x, R_TspSymbol, tsp);
+       setAttrib(x, R_ClassSymbol, class);
+       UNPROTECT(2);
      }
      UNPROTECT(4);
      return x;