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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 26 16:07:24 CEST 2013


Author: bodanker
Date: 2013-08-26 16:07:23 +0200 (Mon, 26 Aug 2013)
New Revision: 790

Modified:
   pkg/xts/R/xts.R
Log:
- fix bug #2750 (Logical operators drop tzone index attribute)


Modified: pkg/xts/R/xts.R
===================================================================
--- pkg/xts/R/xts.R	2013-08-26 12:59:04 UTC (rev 789)
+++ pkg/xts/R/xts.R	2013-08-26 14:07:23 UTC (rev 790)
@@ -123,6 +123,12 @@
     x <- vector(storage.mode(x))
   } else x <- numeric(0)
 
+  # don't overwrite index tzone if tzone arg is missing
+  if(missing(tzone)) {
+    if(!is.null(index.tz <- attr(index,'tzone')))
+      tzone <- index.tz
+  }
+
   structure(.Data=x,
             index=structure(index,tzone=tzone,tclass=.indexCLASS),
             .indexCLASS=.indexCLASS,.indexTZ=tzone,



More information about the Xts-commits mailing list