[Xts-commits] r789 - pkg/xts/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 26 14:59:04 CEST 2013
Author: bodanker
Date: 2013-08-26 14:59:04 +0200 (Mon, 26 Aug 2013)
New Revision: 789
Modified:
pkg/xts/R/xts.methods.R
Log:
- fix bug #2753 (which.i=TRUE ignored with zero-width xts)
Modified: pkg/xts/R/xts.methods.R
===================================================================
--- pkg/xts/R/xts.methods.R 2013-08-26 12:41:20 UTC (rev 788)
+++ pkg/xts/R/xts.methods.R 2013-08-26 12:59:04 UTC (rev 789)
@@ -34,8 +34,9 @@
USE_EXTRACT <- FALSE # initialize to FALSE
if(is.null(dim(x))) {
nr <- length(x)
- if(nr==0)
+ if(nr==0 && !which.i)
return( xts(rep(NA,length(index(x))), index(x))[i] )
+ nr <- length(.index(x))
nc <- 1L
} else {
nr <- nrow(x)
More information about the Xts-commits
mailing list