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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 14 18:09:44 CET 2010


Author: kingaa
Date: 2010-11-14 18:09:42 +0100 (Sun, 14 Nov 2010)
New Revision: 417

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/aaa.R
   pkg/R/bsmc.R
   pkg/R/dmeasure-pomp.R
   pkg/R/dprocess-pomp.R
   pkg/R/init-state-pomp.R
   pkg/R/mif.R
   pkg/R/rmeasure-pomp.R
   pkg/R/rprocess-pomp.R
   pkg/inst/ChangeLog
   pkg/man/dmeasure-pomp.Rd
   pkg/man/dprocess-pomp.Rd
   pkg/man/init.state-pomp.Rd
   pkg/man/pomp-methods.Rd
   pkg/man/rmeasure-pomp.Rd
   pkg/man/rprocess-pomp.Rd
   pkg/man/skeleton-pomp.Rd
   pkg/man/traj-match.Rd
   pkg/man/trajectory-pomp.Rd
Log:
- make declarations of generics uniform


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/DESCRIPTION	2010-11-14 17:09:42 UTC (rev 417)
@@ -2,14 +2,13 @@
 Type: Package
 Title: Statistical inference for partially observed Markov processes
 Version: 0.36-1
-Date: 2010-11-09
+Date: 2010-11-14
 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>
 URL: http://pomp.r-forge.r-project.org
 Description: Inference methods for partially-observed Markov processes
-Depends: R(>= 2.10.1), stats, methods, graphics
-Imports: mvtnorm, subplex, deSolve
+Depends: R(>= 2.10.1), stats, methods, graphics, mvtnorm, subplex, deSolve
 License: GPL(>= 2)
 LazyLoad: true
 LazyData: false

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/NAMESPACE	2010-11-14 17:09:42 UTC (rev 417)
@@ -30,8 +30,8 @@
 importFrom(graphics,plot)		
 importFrom(stats,simulate,time,coef,logLik,window)
 importFrom(mvtnorm,dmvnorm,rmvnorm)
-importFrom(deSolve,lsoda)
 importFrom(subplex,subplex)
+importFrom(deSolve,ode,lsoda)
 
 exportClasses(
               "pomp","pfilterd.pomp",
@@ -42,12 +42,11 @@
               )
 
 exportMethods(
-              'plot','show','print','coerce',
+              'plot','show','print','coerce','summary','logLik','window',
               'dprocess','rprocess','rmeasure','dmeasure','init.state','skeleton',
               'data.array','obs','coef','time','time<-','timezero','timezero<-','$',
               'simulate','pfilter',
               'particles','mif','continue','coef<-','states','trajectory',
-              'summary','logLik','window',
               'pred.mean','pred.var','filter.mean','conv.rec',
               'bsmc',
               'pmcmc','dprior',

Modified: pkg/R/aaa.R
===================================================================
--- pkg/R/aaa.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/aaa.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -6,3 +6,13 @@
 ##   cat("See the NEWS file for important information\n")
 ##}
 
+setGeneric("print",function(x,...)standardGeneric("print"))
+setGeneric("summary",function(object,...)standardGeneric("summary"))
+setGeneric("logLik",function(object,...)standardGeneric("logLik"))
+setGeneric("simulate",function(object,nsim=1,seed=NULL,...)standardGeneric("simulate"))
+setGeneric("time",function(x,...)standardGeneric("time"))
+setGeneric("coef",function(object,...)standardGeneric("coef"))
+setGeneric("window",function(x,...)standardGeneric("window"))
+setGeneric("plot",function(x,y,...)standardGeneric("plot"))
+
+setGeneric("continue",function(object,...)standardGeneric("continue"))

Modified: pkg/R/bsmc.R
===================================================================
--- pkg/R/bsmc.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/bsmc.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -13,9 +13,7 @@
 ## lower  = lower bounds on prior
 ## upper  = upper bounds on prior
 
-bsmc <- function (object, ...)
-  stop("function ",sQuote("bsmc")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('bsmc')
+setGeneric("bsmc",function(object,...)standardGeneric("bsmc"))
 
 setMethod(
           "bsmc",

Modified: pkg/R/dmeasure-pomp.R
===================================================================
--- pkg/R/dmeasure-pomp.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/dmeasure-pomp.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,18 +1,9 @@
-dmeasure <- function (object, y, x, times, params, log = FALSE, ...)
-  stop("function ",sQuote("dmeasure")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('dmeasure')  
+setGeneric("dmeasure",function(object,...)standardGeneric("dmeasure"))
 
 ## evaluate the measurement model density function
 setMethod(
           'dmeasure',
           'pomp',
-          function (object, y, x, times, params, log = FALSE, ...) {
-            val <- try(
-                       .Call(do_dmeasure,object,y,x,times,params,log),
-                       silent=FALSE
-                       )
-            if (inherits(val,'try-error'))
-              stop("dmeasure error: error in user ",sQuote("dmeasure"),call.=FALSE)
-            val
-          }
+          function (object, y, x, times, params, log = FALSE, ...)
+            .Call(do_dmeasure,object,y,x,times,params,log),
           )

Modified: pkg/R/dprocess-pomp.R
===================================================================
--- pkg/R/dprocess-pomp.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/dprocess-pomp.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,19 +1,9 @@
-dprocess <- function (object, x, times, params, log = FALSE, ...)
-  stop("function ",sQuote("dprocess")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('dprocess')  
+setGeneric("dprocess",function(object,...)standardGeneric("dprocess"))
 
 ## evaluate the process model density function
 setMethod(
           'dprocess',
           'pomp',
-## SEXP do_dprocess (SEXP object, SEXP x, SEXP times, SEXP params, SEXP log)
-          function (object, x, times, params, log = FALSE, ...) {
-            x <- try(
-                     .Call(do_dprocess,object,x,times,params,log),
-                     silent=FALSE
-                     )
-            if (inherits(x,'try-error'))
-              stop("dprocess error: error in user ",sQuote("dprocess"),call.=FALSE)
-            x
-          }
+          function (object, x, times, params, log = FALSE, ...)
+            .Call(do_dprocess,object,x,times,params,log),
           )

Modified: pkg/R/init-state-pomp.R
===================================================================
--- pkg/R/init-state-pomp.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/init-state-pomp.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,6 +1,4 @@
-init.state <- function (object, params, t0, ...)
-  stop("function ",sQuote("init.state")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('init.state')  
+setGeneric("init.state",function(object,...)standardGeneric("init.state"))
 
 ## initialize the process model
 setMethod(

Modified: pkg/R/mif.R
===================================================================
--- pkg/R/mif.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/mif.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -267,7 +267,6 @@
 }
 
 setGeneric('mif',function(object,...)standardGeneric("mif"))
-setGeneric('continue',function(object,...)standardGeneric("continue"))
 
 setMethod(
           "mif",

Modified: pkg/R/rmeasure-pomp.R
===================================================================
--- pkg/R/rmeasure-pomp.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/rmeasure-pomp.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,18 +1,9 @@
-rmeasure <- function (object, x, times, params, ...)
-  stop("function ",sQuote("rmeasure")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('rmeasure')  
+setGeneric("rmeasure",function(object,...)standardGeneric("rmeasure"))
 
 ## simulate the measurement model
 setMethod(
           'rmeasure',
           'pomp',
-          function (object, x, times, params, ...) {
-            val <- try(
-                       .Call(do_rmeasure,object,x,times,params),
-                       silent=FALSE
-                       )
-            if (inherits(val,'try-error'))
-              stop("rmeasure error: error in user ",sQuote("rmeasure"),call.=FALSE)
-            val
-          }
+          function (object, x, times, params, ...)
+            .Call(do_rmeasure,object,x,times,params),
           )

Modified: pkg/R/rprocess-pomp.R
===================================================================
--- pkg/R/rprocess-pomp.R	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/R/rprocess-pomp.R	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,6 +1,4 @@
-rprocess <- function (object, xstart, times, params, ...)
-  stop("function ",sQuote("rprocess")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('rprocess')  
+setGeneric("rprocess",function(object,...)standardGeneric("rprocess"))
 
 ## simulate the process model
 setMethod(

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/inst/ChangeLog	2010-11-14 17:09:42 UTC (rev 417)
@@ -1,5 +1,42 @@
+2010-11-09  kingaa
+
+	* [r416] DESCRIPTION, R/traj-match.R,
+	  inst/doc/advanced_topics_in_pomp.pdf, inst/doc/intro_to_pomp.pdf:
+	  - revert version dependence to R>=2.10.1
+	  - fix bug in 'traj.match'
+	* [r415] DESCRIPTION, R/traj-match.R,
+	  inst/doc/advanced_topics_in_pomp.pdf, inst/doc/intro_to_pomp.pdf,
+	  tests/ou2-trajmatch.R, tests/ou2-trajmatch.Rout.save: - fix bug
+	  in 'traj.match'
+
+2010-11-08  kingaa
+
+	* [r414] DESCRIPTION, R/traj-match.R, data/euler.sir.rda,
+	  inst/data-R/euler.sir.R, man/traj-match.Rd, src/sir.c,
+	  tests/sir.R, tests/sir.Rout.save: - 'traj.match' is now
+	  implemented as a generic with methods for 'pomp' and
+	  'traj.matched.pomp' objects
+	  - the 'euler.sir' example has a different skeleton, one for which
+	  'cases' gives the approximate weekly number of new cases
+	* [r413] DESCRIPTION, NAMESPACE, R/probe-match.R, R/spect-match.R,
+	  inst/doc/advanced_topics_in_pomp.pdf, inst/doc/intro_to_pomp.pdf,
+	  man/pfilter.Rd, man/pmcmc-class.Rd, man/pmcmc.Rd, man/probe.Rd,
+	  man/probed-pomp-class.Rd, man/spect-pomp-class.Rd, man/spect.Rd,
+	  man/traj-match.Rd, tests/ricker-probe.R,
+	  tests/ricker-probe.Rout.save, tests/ricker-spect.R,
+	  tests/ricker-spect.Rout.save: - arrange for all classes to be
+	  exported
+	  - rearrange documentation for classes; now it's together with the
+	  constructors
+	  - fix bug in 'spect.match' with eval.only=TRUE
+	  - add slot in 'probe.matched.pomp' to make it parallel with
+	  'spect.matched.pomp'
+
 2010-11-07  kingaa
 
+	* [r412] R/traj-match.R, inst/ChangeLog,
+	  inst/doc/intro_to_pomp.pdf, inst/doc/ou2-first-mif.rda,
+	  inst/doc/ou2-trajmatch.rda: - streamline 'traj.match' slightly
 	* [r411] R/nlf-objfun.R, R/spect.R, inst/doc/intro_to_pomp.Rnw,
 	  man/basic-probes.Rd, man/spect.Rd: - replace 'data.array' with
 	  'obs' as the preferred method

Modified: pkg/man/dmeasure-pomp.Rd
===================================================================
--- pkg/man/dmeasure-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/dmeasure-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -11,7 +11,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-dmeasure(object, y, x, times, params, log = FALSE, \dots)
 \S4method{dmeasure}{pomp}(object, y, x, times, params, log = FALSE, \dots)
 }
 \arguments{

Modified: pkg/man/dprocess-pomp.Rd
===================================================================
--- pkg/man/dprocess-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/dprocess-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -13,7 +13,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-dprocess(object, x, times, params, log = FALSE, \dots)
 \S4method{dprocess}{pomp}(object, x, times, params, log = FALSE, \dots)
 }
 \arguments{

Modified: pkg/man/init.state-pomp.Rd
===================================================================
--- pkg/man/init.state-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/init.state-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -11,7 +11,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-init.state(object, params, t0, \dots)
 \S4method{init.state}{pomp}(object, params, t0, \dots)
 }
 \arguments{

Modified: pkg/man/pomp-methods.Rd
===================================================================
--- pkg/man/pomp-methods.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/pomp-methods.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -19,7 +19,7 @@
 \alias{timezero<-,pomp-method}
 \alias{timezero<--pomp}
 \alias{window,pomp-method}
-\alias{window--pomp}
+\alias{window-pomp}
 \alias{obs,pomp-method}
 \alias{obs-pomp}
 \alias{obs}

Modified: pkg/man/rmeasure-pomp.Rd
===================================================================
--- pkg/man/rmeasure-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/rmeasure-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -11,7 +11,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-rmeasure(object, x, times, params, \dots)
 \S4method{rmeasure}{pomp}(object, x, times, params, \dots)
 }
 \arguments{

Modified: pkg/man/rprocess-pomp.Rd
===================================================================
--- pkg/man/rprocess-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/rprocess-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -11,7 +11,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-rprocess(object, xstart, times, params, \dots)
 \S4method{rprocess}{pomp}(object, xstart, times, params, offset, \dots)
 }
 \arguments{

Modified: pkg/man/skeleton-pomp.Rd
===================================================================
--- pkg/man/skeleton-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/skeleton-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -15,7 +15,6 @@
   This help page does not give instructions on the implementation of models: see \code{\link{pomp}} for instructions.
 }
 \usage{
-skeleton(object, x, t, params, \dots)
 \S4method{skeleton}{pomp}(object, x, t, params, \dots)
 }
 \arguments{

Modified: pkg/man/traj-match.Rd
===================================================================
--- pkg/man/traj-match.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/traj-match.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -17,11 +17,11 @@
 }
 \usage{
   \S4method{traj.match}{pomp}(object, start, est,
-                 method = c("Nelder-Mead", "SANN", "subplex"),
-                 gr = NULL, eval.only = FALSE, \dots)
+           method = c("Nelder-Mead", "SANN", "subplex"),
+           gr = NULL, eval.only = FALSE, \dots)
   \S4method{traj.match}{traj.matched.pomp}(object, start, est,
-                 method = c("Nelder-Mead", "SANN", "subplex"),
-                 gr = NULL, eval.only = FALSE, \dots)
+           method = c("Nelder-Mead", "SANN", "subplex"),
+           gr = NULL, eval.only = FALSE, \dots)
 }
 \arguments{
   \item{object}{A \code{pomp} object.}

Modified: pkg/man/trajectory-pomp.Rd
===================================================================
--- pkg/man/trajectory-pomp.Rd	2010-11-09 23:55:50 UTC (rev 416)
+++ pkg/man/trajectory-pomp.Rd	2010-11-14 17:09:42 UTC (rev 417)
@@ -24,7 +24,7 @@
     \code{t0} specifies the start time (the time at which the initial conditions hold).
     The default for \code{times} is \code{times=time(object,t0=FALSE)} and \code{t0=timezero(object)}, respectively.
   }
-  \item{\dots}{at present, these are ignored.}
+  \item{\dots}{at present, these are passed to the ODE integrator if the skeleton is a vectorfield and ignored if it is a map.}
 }
 \value{
   Returns an array of dimensions \code{nvar} x \code{nreps} x \code{ntimes}.



More information about the pomp-commits mailing list