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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Dec 23 17:13:33 CET 2012


Author: jryan
Date: 2012-12-23 17:13:33 +0100 (Sun, 23 Dec 2012)
New Revision: 749

Modified:
   pkg/xts/R/xts.R
Log:
o  xts() displays warning for order.by of class Date and if tzone is set. Bring on the smarter fools!


Modified: pkg/xts/R/xts.R
===================================================================
--- pkg/xts/R/xts.R	2012-12-23 15:52:27 UTC (rev 748)
+++ pkg/xts/R/xts.R	2012-12-23 16:13:33 UTC (rev 749)
@@ -48,8 +48,11 @@
   if(inherits(order.by, 'dates'))
     tzone <- ""
 
-  if(inherits(order.by, 'Date') && missing(tzone))
+  if(inherits(order.by, 'Date')) {
+    if(!missing(tzone))
+      warning(paste(sQuote('tzone'),"setting ignored for Date indexes"))
     tzone <- "UTC"
+  }
   
   #if(NROW(x) != length(order.by))
   if(NROW(x) > 0 && NROW(x) != length(order.by))



More information about the Xts-commits mailing list