[Xts-commits] r634 - pkg/xts/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 17 03:47:40 CEST 2012


Author: bodanker
Date: 2012-06-17 03:47:37 +0200 (Sun, 17 Jun 2012)
New Revision: 634

Modified:
   pkg/xts/R/Ops.xts.R
Log:
- Fix edge case in Ops.xts where two objects with no common index create
  an 'xts' object with no index


Modified: pkg/xts/R/Ops.xts.R
===================================================================
--- pkg/xts/R/Ops.xts.R	2012-06-16 17:44:31 UTC (rev 633)
+++ pkg/xts/R/Ops.xts.R	2012-06-17 01:47:37 UTC (rev 634)
@@ -44,6 +44,8 @@
     }
   }
   if(.Generic %in% c("+","-","*","/","^","%%","%/%")) {
+    if(length(e)==0)
+      attr(e,'index') <- numeric(0)
     #.Call('add_xts_class', e)
     .Call('add_class', e, CLASS, PACKAGE="xts")
   }



More information about the Xts-commits mailing list