[Rcpp-commits] r4252 - in pkg/RcppSMC: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 11 21:06:37 CET 2013


Author: adamj
Date: 2013-02-11 21:06:36 +0100 (Mon, 11 Feb 2013)
New Revision: 4252

Modified:
   pkg/RcppSMC/ChangeLog
   pkg/RcppSMC/R/pfNonlinBS.R
Log:
Added simulation of default data when no data supplied.`


Modified: pkg/RcppSMC/ChangeLog
===================================================================
--- pkg/RcppSMC/ChangeLog	2013-02-11 02:46:48 UTC (rev 4251)
+++ pkg/RcppSMC/ChangeLog	2013-02-11 20:06:36 UTC (rev 4252)
@@ -1,3 +1,9 @@
+2013-02-11  Adam Johansen  <a.m.johansen at warwick.ac.uk>
+
+	* DESCRIPTION: Version 0.1.1.2 as minor dev version, next release as 0.1.2
+
+	* R/pfNonlinBS.R: Automatically simulate data, and warn, if none supplied.
+
 2013-02-10  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Version 0.1.1.1 as minor dev version, next release as 0.1.2

Modified: pkg/RcppSMC/R/pfNonlinBS.R
===================================================================
--- pkg/RcppSMC/R/pfNonlinBS.R	2013-02-11 02:46:48 UTC (rev 4251)
+++ pkg/RcppSMC/R/pfNonlinBS.R	2013-02-11 20:06:36 UTC (rev 4252)
@@ -1,7 +1,7 @@
 pfNonlinBS <- function(data, particles=500, plot=FALSE) {
     if (missing(data)) {
-        warning("data argument contained no data, returning...")
-        return;
+         warning("data argument contained no data, using data simulated from the model.")
+         data <- simNonlin(len=50)$data
     }
     res <- .Call("pfNonlinBS", data, particles, package="RcppSMC")
 



More information about the Rcpp-commits mailing list