[Xts-commits] r786 - in pkg/xts: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 20 05:47:23 CEST 2013


Author: jryan
Date: 2013-08-20 05:47:23 +0200 (Tue, 20 Aug 2013)
New Revision: 786

Modified:
   pkg/xts/DESCRIPTION
   pkg/xts/R/fts.R
   pkg/xts/R/irts.R
   pkg/xts/R/its.R
   pkg/xts/R/origin.fix.R
   pkg/xts/R/timeSeries.R
Log:
o updated for CRAN release. Small changes related to NOTE in 3.0.1


Modified: pkg/xts/DESCRIPTION
===================================================================
--- pkg/xts/DESCRIPTION	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/DESCRIPTION	2013-08-20 03:47:23 UTC (rev 786)
@@ -1,7 +1,7 @@
 Package: xts
 Type: Package
 Title: eXtensible Time Series
-Version: 0.9-5.1
+Version: 0.9-6
 Date: 2013-06-26
 Author: Jeffrey A. Ryan, Joshua M. Ulrich
 Depends: zoo (>= 1.7-10)

Modified: pkg/xts/R/fts.R
===================================================================
--- pkg/xts/R/fts.R	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/R/fts.R	2013-08-20 03:47:23 UTC (rev 786)
@@ -34,10 +34,16 @@
 `as.fts.xts` <-
 function(x)
 {
+  if(!require('fts', quietly=TRUE))
+    fts <- function(...) message("package 'fts' is required")
+
   fts(coredata(x), structure(.index(x), class=c("POSIXt","POSIXct")))
 }
 
 re.fts <- function(x, ...) 
 {
+  if(!require('fts', quietly=TRUE))
+    fts <- function(...) message("package 'fts' is required")
+
   fts(coredata(x), structure(.index(x), class=c("POSIXt","POSIXct")))
 }

Modified: pkg/xts/R/irts.R
===================================================================
--- pkg/xts/R/irts.R	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/R/irts.R	2013-08-20 03:47:23 UTC (rev 786)
@@ -23,7 +23,9 @@
 
 `re.irts` <-
 function(x,...) {
-  stopifnot("package:tseries" %in% search() || require("tseries",quietly=TRUE))
+  if(!require('tseries', quietly=TRUE))
+    irts <- function(...) message("package 'tseries' is required for re.irts")
+
   indexClass(x) <- "POSIXct"
   xx <- coredata(x)
 #  rownames(xx) <- attr(x,'irts.rownames')

Modified: pkg/xts/R/its.R
===================================================================
--- pkg/xts/R/its.R	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/R/its.R	2013-08-20 03:47:23 UTC (rev 786)
@@ -23,7 +23,9 @@
 
 `re.its` <-
 function(x, ...) {
-  stopifnot("package:its" %in% search() || require("its",quietly=TRUE))
+  if(!require('its', quietly=TRUE))
+    its <- function(...) message("package 'fts' is required")
+
   xx <- coredata(x)
   dates <- index(x)
   its(xx,dates=dates,...)

Modified: pkg/xts/R/origin.fix.R
===================================================================
--- pkg/xts/R/origin.fix.R	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/R/origin.fix.R	2013-08-20 03:47:23 UTC (rev 786)
@@ -72,5 +72,8 @@
 }
 as.chron.POSIXct <- function(x, ...)
 {
+  if( !require('chron', quietly=TRUE))
+    as.chron <- function(...) message("package 'chron' required")
+
   structure(as.chron(as.POSIXlt(as.character(x))))
 }

Modified: pkg/xts/R/timeSeries.R
===================================================================
--- pkg/xts/R/timeSeries.R	2013-08-17 23:15:29 UTC (rev 785)
+++ pkg/xts/R/timeSeries.R	2013-08-20 03:47:23 UTC (rev 786)
@@ -23,7 +23,8 @@
 
 `re.timeSeries` <-
 function(x,...) {
-  stopifnot("package:timeSeries" %in% search() || require("timeSeries", quietly=TRUE))
+  if(!require('timeSeries', quietly=TRUE))
+    timeSeries <- function(...) message("package 'timeSeries' is required")
 
   # strip all non-'core' attributes so they're not attached to the Data slot
   x.attr <- attributes(x)
@@ -76,6 +77,9 @@
 }
 
 as.timeSeries.xts <- function(x, ...) {
+  if(!require('timeSeries', quietly=TRUE))
+    timeSeries <- function(...) message("package 'timeSeries' is required")
+
   timeSeries(data=coredata(x), charvec=as.character(index(x)), ...)
 }
 



More information about the Xts-commits mailing list