[Pomp-commits] r619 - in pkg: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 7 00:50:27 CET 2012


Author: kingaa
Date: 2012-03-07 00:50:27 +0100 (Wed, 07 Mar 2012)
New Revision: 619

Modified:
   pkg/DESCRIPTION
   pkg/R/parmat.R
   pkg/inst/NEWS
   pkg/man/parmat.Rd
Log:
- extend functionality of 'parmat' slightly


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2012-02-15 23:11:14 UTC (rev 618)
+++ pkg/DESCRIPTION	2012-03-06 23:50:27 UTC (rev 619)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical inference for partially observed Markov processes
-Version: 0.40-6
-Date: 2012-02-15
+Version: 0.40-7
+Date: 2012-03-06
 Revision: $Rev$
 Author: Aaron A. King, Edward L. Ionides, Carles Breto, Steve Ellner, Bruce Kendall, Helen Wearing, Matthew J. Ferrari, Michael Lavine, Daniel C. Reuman
 Maintainer: Aaron A. King <kingaa at umich.edu>

Modified: pkg/R/parmat.R
===================================================================
--- pkg/R/parmat.R	2012-02-15 23:11:14 UTC (rev 618)
+++ pkg/R/parmat.R	2012-03-06 23:50:27 UTC (rev 619)
@@ -1,5 +1,6 @@
 parmat <- function (params, nrep = 1) {
-  p <- matrix(data=params,nrow=length(params),ncol=nrep)
-  rownames(p) <- names(params)
+  params <- as.matrix(params)
+  p <- matrix(data=params,nrow=nrow(params),ncol=ncol(params)*nrep)
+  rownames(p) <- rownames(params)
   p
 }

Modified: pkg/inst/NEWS
===================================================================
--- pkg/inst/NEWS	2012-02-15 23:11:14 UTC (rev 618)
+++ pkg/inst/NEWS	2012-03-06 23:50:27 UTC (rev 619)
@@ -1,4 +1,7 @@
 NEWS
+0.40-7
+     o	'parmat' now gracefully handles the case when 'params' is already a matrix.
+
 0.40-6
      o	When a pomp object is updated using 'pomp', the 'params' slot will now be copied over (appropriately transformed).
      	Before, it was simply dropped.

Modified: pkg/man/parmat.Rd
===================================================================
--- pkg/man/parmat.Rd	2012-02-15 23:11:14 UTC (rev 618)
+++ pkg/man/parmat.Rd	2012-03-06 23:50:27 UTC (rev 619)
@@ -9,14 +9,14 @@
 }
 \arguments{
   \item{params}{
-    named numeric vector of parameters.
+    named numeric vector or matrix of parameters.
   }
   \item{nrep}{
     number of replicates (columns) desired.
   }
 }
 \value{
-  \code{parmat} returns a matrix consisting of \code{nrep} copies of \code{params} and rownames identical to the names of \code{params}.
+  \code{parmat} returns a matrix consisting of \code{nrep} copies of \code{params}.
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \examples{



More information about the pomp-commits mailing list