From noreply at r-forge.r-project.org Tue Apr 2 02:40:32 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 2 Apr 2013 02:40:32 +0200 (CEST) Subject: [Xts-commits] r769 - in pkg/xts: R man Message-ID: <20130402004033.060401850B5@r-forge.r-project.org> Author: bodanker Date: 2013-04-02 02:40:32 +0200 (Tue, 02 Apr 2013) New Revision: 769 Modified: pkg/xts/R/merge.R pkg/xts/man/merge.Rd Log: - add drop and check.names args to match merge.zoo Modified: pkg/xts/R/merge.R =================================================================== --- pkg/xts/R/merge.R 2013-02-03 04:59:38 UTC (rev 768) +++ pkg/xts/R/merge.R 2013-04-02 00:40:32 UTC (rev 769) @@ -26,7 +26,9 @@ join="outer", retside=TRUE, retclass="xts", - tzone=NULL) { + tzone=NULL, + drop=NULL, + check.names=NULL) { if(is.logical(retclass) && !retclass) { setclass=FALSE } else setclass <- TRUE Modified: pkg/xts/man/merge.Rd =================================================================== --- pkg/xts/man/merge.Rd 2013-02-03 04:59:38 UTC (rev 768) +++ pkg/xts/man/merge.Rd 2013-04-02 00:40:32 UTC (rev 769) @@ -17,7 +17,9 @@ join = "outer", retside = TRUE, retclass = "xts", - tzone = NULL) + tzone = NULL, + drop=NULL, + check.names=NULL) } \arguments{ \item{\dots}{ one or more xts objects, or objects coercible to class xts } @@ -28,6 +30,8 @@ \item{retside}{ which side of the merged object should be returned (2-case only) } \item{retclass}{ object to return } \item{tzone}{ time zone of merged object } + \item{drop}{ not currently used } + \item{check.names}{ not currently used } } \details{ This is an xts method compatible with merge.zoo, as xts extends zoo. From noreply at r-forge.r-project.org Sun Apr 21 16:27:11 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 21 Apr 2013 16:27:11 +0200 (CEST) Subject: [Xts-commits] r770 - pkg/xts/R Message-ID: <20130421142711.73DA118044B@r-forge.r-project.org> Author: bodanker Date: 2013-04-21 16:27:11 +0200 (Sun, 21 Apr 2013) New Revision: 770 Modified: pkg/xts/R/xts.methods.R Log: - patch zero-width xts subsetting (bug #2669) Modified: pkg/xts/R/xts.methods.R =================================================================== --- pkg/xts/R/xts.methods.R 2013-04-02 00:40:32 UTC (rev 769) +++ pkg/xts/R/xts.methods.R 2013-04-21 14:27:11 UTC (rev 770) @@ -34,8 +34,13 @@ USE_EXTRACT <- FALSE # initialize to FALSE if(is.null(dim(x))) { nr <- length(x) - if(nr==0) - return( .xts(rep(NA,length(i)), .index(x)[i], .indexCLASS=indexClass(x)) ) + if(nr==0) { + ix <- .index(x) + tmp <- .xts(rep(NA,length(ix)), ix) + indexClass(tmp) <- indexClass(x) + indexTZ(tmp) <- indexTZ(x) + return(tmp[i]) + } nc <- 1L } else { nr <- nrow(x) From noreply at r-forge.r-project.org Sun Apr 21 18:36:44 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 21 Apr 2013 18:36:44 +0200 (CEST) Subject: [Xts-commits] r771 - pkg/xts/R Message-ID: <20130421163644.623BB184D47@r-forge.r-project.org> Author: bodanker Date: 2013-04-21 18:36:44 +0200 (Sun, 21 Apr 2013) New Revision: 771 Modified: pkg/xts/R/xts.methods.R Log: - re-patch zero-width xts subsetting (bug #2669) Modified: pkg/xts/R/xts.methods.R =================================================================== --- pkg/xts/R/xts.methods.R 2013-04-21 14:27:11 UTC (rev 770) +++ pkg/xts/R/xts.methods.R 2013-04-21 16:36:44 UTC (rev 771) @@ -34,13 +34,8 @@ USE_EXTRACT <- FALSE # initialize to FALSE if(is.null(dim(x))) { nr <- length(x) - if(nr==0) { - ix <- .index(x) - tmp <- .xts(rep(NA,length(ix)), ix) - indexClass(tmp) <- indexClass(x) - indexTZ(tmp) <- indexTZ(x) - return(tmp[i]) - } + if(nr==0) + return( xts(rep(NA,length(index(x))), index(x))[i] ) nc <- 1L } else { nr <- nrow(x) From noreply at r-forge.r-project.org Thu Apr 25 03:01:39 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 25 Apr 2013 03:01:39 +0200 (CEST) Subject: [Xts-commits] r772 - pkg/xts/R Message-ID: <20130425010139.C1AA7184BDE@r-forge.r-project.org> Author: bodanker Date: 2013-04-25 03:01:39 +0200 (Thu, 25 Apr 2013) New Revision: 772 Modified: pkg/xts/R/toperiod.R Log: - patch to.period bug (#2691, #2710), thanks to Garrett See Modified: pkg/xts/R/toperiod.R =================================================================== --- pkg/xts/R/toperiod.R 2013-04-21 16:36:44 UTC (rev 771) +++ pkg/xts/R/toperiod.R 2013-04-25 01:01:39 UTC (rev 772) @@ -80,7 +80,7 @@ if(indexAt=="yearmon" || indexAt=="yearqtr") indexClass(xx) <- indexAt if(indexAt=="firstof") { - ix <- as.POSIXlt(c(.index(xx))) + ix <- as.POSIXlt(c(.index(xx)), tz=indexTZ(xx)) if(period %in% c("years","months","quarters","days")) index(xx) <- firstof(ix$year + 1900, ix$mon + 1) else @@ -88,7 +88,7 @@ ix$hour, ix$min, ix$sec) } if(indexAt=="lastof") { - ix <- as.POSIXlt(c(.index(xx))) + ix <- as.POSIXlt(c(.index(xx)), tz=indexTZ(xx)) if(period %in% c("years","months","quarters","days")) index(xx) <- as.Date(lastof(ix$year + 1900, ix$mon + 1)) else