[Xts-commits] r740 - in pkg/xts: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 8 14:56:50 CET 2012
Author: bodanker
Date: 2012-11-08 14:56:50 +0100 (Thu, 08 Nov 2012)
New Revision: 740
Modified:
pkg/xts/DESCRIPTION
pkg/xts/NAMESPACE
pkg/xts/R/rollapply.xts.R
Log:
- bump version
- re-register mean.xts S3 method
- update rollapply.xts register S3 method
Modified: pkg/xts/DESCRIPTION
===================================================================
--- pkg/xts/DESCRIPTION 2012-11-05 21:52:21 UTC (rev 739)
+++ pkg/xts/DESCRIPTION 2012-11-08 13:56:50 UTC (rev 740)
@@ -1,7 +1,7 @@
Package: xts
Type: Package
Title: eXtensible Time Series
-Version: 0.8-8
+Version: 0.8-9
Date: 2012-10-05
Author: Jeffrey A. Ryan, Joshua M. Ulrich
Depends: zoo (>= 1.7-2)
Modified: pkg/xts/NAMESPACE
===================================================================
--- pkg/xts/NAMESPACE 2012-11-05 21:52:21 UTC (rev 739)
+++ pkg/xts/NAMESPACE 2012-11-08 13:56:50 UTC (rev 740)
@@ -141,12 +141,8 @@
S3method(make.index.unique, POSIXct)
S3method(is.time.unique, xts)
S3method(is.time.unique, zoo)
+S3method(mean,xts)
-#S3method(mean,xts)
-#S3method(sd,xts)
-
-#S3method(rollapply,xts)
-
# xts methods
importFrom(zoo,coredata)
importFrom(zoo, index)
@@ -155,7 +151,7 @@
importFrom(zoo, na.locf)
importFrom(zoo, as.zoo)
#importFrom(zoo, lagts)
-#importFrom(zoo, rollapply)
+importFrom(zoo, rollapply)
importFrom(stats,na.omit)
importFrom(stats,start)
importFrom(stats,end)
@@ -203,7 +199,7 @@
S3method(cummin, xts)
S3method(cummax, xts)
#S3method(lagts,xts)
-#S3method(rollapply, xts)
+S3method(rollapply, xts)
# list specific methods
S3method(as.list,xts)
Modified: pkg/xts/R/rollapply.xts.R
===================================================================
--- pkg/xts/R/rollapply.xts.R 2012-11-05 21:52:21 UTC (rev 739)
+++ pkg/xts/R/rollapply.xts.R 2012-11-08 13:56:50 UTC (rev 740)
@@ -18,19 +18,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-rollapply.xts <- function(data, width, FUN, ..., by=1, ascending=TRUE,
- by.column=TRUE, na.pad=FALSE, align=c("center","left","right")) {
+rollapply.xts <- function(data, width, FUN, ..., by=1, by.column=TRUE,
+ fill=if(na.pad) NA, na.pad=TRUE, partial=TRUE,
+ align=c("right","center","left")) {
- data <- try.xts(data)
- if(!ascending) {
- warning("ignoring 'ascending=FALSE'")
- ascending <- TRUE
+ if (!missing(na.pad)) {
+ warning("na.pad argument is deprecated")
}
- #if(by != 1) {
- #warning(paste("ignoring 'by=",by,"'",sep=""))
- #by <- 1
- #}
- if(missing(align)) align <- "right"
+ if (!missing(partial)) {
+ warning("partial argument is not currently supported")
+ }
+
+ data <- try.xts(data) # jmu: is this necessary?
# Code taken/adapted from rollapply.zoo from the 'zoo' package
More information about the Xts-commits
mailing list