[Rcpp-commits] r4448 - in pkg/RcppXts: . man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 24 21:00:52 CEST 2013


Author: edd
Date: 2013-08-24 21:00:51 +0200 (Sat, 24 Aug 2013)
New Revision: 4448

Modified:
   pkg/RcppXts/DESCRIPTION
   pkg/RcppXts/man/RcppXts-package.Rd
   pkg/RcppXts/src/xtsMod.cpp
Log:
also expose the one function still only exported in xts on R-Forge
depend on that R-Forge version via Depends:


Modified: pkg/RcppXts/DESCRIPTION
===================================================================
--- pkg/RcppXts/DESCRIPTION	2013-08-24 18:22:50 UTC (rev 4447)
+++ pkg/RcppXts/DESCRIPTION	2013-08-24 19:00:51 UTC (rev 4448)
@@ -11,6 +11,6 @@
  In its current state, the package is mostly a proof-of-concept to support
  adding useful functions, and does not yet add any of its own.
 License: GPL (>= 2)
-Depends: methods, Rcpp (>= 0.10.2), xts (>= 0.9-2)
+Depends: methods, Rcpp (>= 0.10.2), xts (>= 0.9-5.1)
 LinkingTo: Rcpp, xts
 RcppModules: xts

Modified: pkg/RcppXts/man/RcppXts-package.Rd
===================================================================
--- pkg/RcppXts/man/RcppXts-package.Rd	2013-08-24 18:22:50 UTC (rev 4447)
+++ pkg/RcppXts/man/RcppXts-package.Rd	2013-08-24 19:00:51 UTC (rev 4448)
@@ -13,6 +13,7 @@
 \alias{xtsMakeUnique}
 \alias{xtsMerge}
 \alias{xtsNaOmit}
+\alias{xtsNaLocf},
 \docType{package}
 \title{Interface to the C API of xts}
 \description{This package helps with an Rcpp-based interface to the API
@@ -30,6 +31,7 @@
   xtsMakeUnique(x, eps)
   xtsMerge(x, y, all, fill, retclass, colnames, suffixes, retside, env, coerce)
   xtsNaOmit(x)
+  xtsNaLocf(x, fromLast, maxgap, limit)
 }
 \arguments{
   \item{x}{an \code{xts} object}
@@ -40,7 +42,6 @@
   \item{dup}{a boolean switch whether to remove duplicates}
   \item{k}{an integer denoting lag length, or interval}
   \item{pad}{a boolean switch whether to pad}
-
   \item{on}{a numeric value for desired distance, measure in seconds, between endpoints}
   \item{addlast}{a boolean switch whether last value should be included}
   \item{eps}{a numeric value for the desired minimal difference between elements}
@@ -56,6 +57,12 @@
     dimension if these need to be set}
   \item{env}{an environment, possibly empty}
   \item{coerce}{an integer value indicating if coercion should be forced}
+  \item{fromLast}{a boolean variable indicating whether observations
+    should be carried backward rather than forward; default FALSE}
+  \item{maxgap}{a double indicating the maximum number of NAs to be
+    retained; default is Inf}
+  \item{limit}{a double value for the limit of consecutive NA values;
+    default is Inf}
 }
 \details{Please use the \pkg{xts} sources as the ultimate reference for
   these variables. The R functions in package \pkg{xts} set some of

Modified: pkg/RcppXts/src/xtsMod.cpp
===================================================================
--- pkg/RcppXts/src/xtsMod.cpp	2013-08-24 18:22:50 UTC (rev 4447)
+++ pkg/RcppXts/src/xtsMod.cpp	2013-08-24 19:00:51 UTC (rev 4448)
@@ -98,9 +98,9 @@
              "Omit NA values");
 
     // -- this requires xts 0.9-6 or later (fixed in SVN)
-    // function("xtsNaLocf",
-    //          &xtsNaLocf,
-    //          List::create(Named("x"), Named("fromLast"), Named("maxgap"), Named("limit")),
-    //          "Fill NA values by carrying last observation forward");
+    function("xtsNaLocf",
+             &xtsNaLocf,
+             List::create(Named("x"), Named("fromLast"), Named("maxgap"), Named("limit")),
+             "Fill NA values by carrying last observation forward");
 
 }



More information about the Rcpp-commits mailing list