[Pomp-commits] r411 - in pkg: R inst/doc man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 7 17:47:23 CET 2010


Author: kingaa
Date: 2010-11-07 17:47:23 +0100 (Sun, 07 Nov 2010)
New Revision: 411

Modified:
   pkg/R/nlf-objfun.R
   pkg/R/spect.R
   pkg/inst/doc/intro_to_pomp.Rnw
   pkg/man/basic-probes.Rd
   pkg/man/spect.Rd
Log:
- replace 'data.array' with 'obs' as the preferred method


Modified: pkg/R/nlf-objfun.R
===================================================================
--- pkg/R/nlf-objfun.R	2010-11-07 14:40:36 UTC (rev 410)
+++ pkg/R/nlf-objfun.R	2010-11-07 16:47:23 UTC (rev 411)
@@ -20,7 +20,7 @@
   ## Version 0.1, 3 Dec. 2007, Bruce E. Kendall & Stephen P. Ellner
   ## Version 0.2, May 2008, Stephen P. Ellner  
 
-  data.ts <- data.array(object)
+  data.ts <- obs(object)
   
   y <- try(
            simulate(object,times=times,t0=t0,params=params,seed=seed,obs=TRUE,states=FALSE),

Modified: pkg/R/spect.R
===================================================================
--- pkg/R/spect.R	2010-11-07 14:40:36 UTC (rev 410)
+++ pkg/R/spect.R	2010-11-07 16:47:23 UTC (rev 411)
@@ -58,7 +58,7 @@
 }
 
 compute.spect.data <- function (object, vars, transform, detrend, ker) {
-  dat <- data.array(object,vars)
+  dat <- obs(object,vars)
   if (any(is.na(dat)))
     stop(sQuote("spect")," is incompatible with NAs in the data")
   dt <- diff(time(object,t0=FALSE))

Modified: pkg/inst/doc/intro_to_pomp.Rnw
===================================================================
--- pkg/inst/doc/intro_to_pomp.Rnw	2010-11-07 14:40:36 UTC (rev 410)
+++ pkg/inst/doc/intro_to_pomp.Rnw	2010-11-07 16:47:23 UTC (rev 411)
@@ -441,7 +441,7 @@
 An implementation of the Kalman filter is given in Box~\ref{box:kalman-filter-def}.
 Let's run the Kalman filter on the example data we generated above:
 <<kalman-filter-run>>=
-y <- data.array(ou2)
+y <- obs(ou2)
 a <- matrix(theta.guess[c('alpha.1','alpha.2','alpha.3','alpha.4')],nrow=2,ncol=2)
 b <- diag(1,2)   ## b is the identity matrix
 sigma <- matrix(
@@ -473,7 +473,7 @@
 and if we \code{print} a \pomp\ object, the resulting data frame is what is shown, together with the call that created the \pomp\ object.
 One can access the data and the observation times using
 <<eval=F>>=
-data.array(ou2)
+obs(ou2)
 time(ou2)  
 @ 
 The observation times can be changed using
@@ -741,10 +741,10 @@
 \begin{figure}
 <<trajmatch-plot,fig=T,echo=F,eval=T>>=
 op <- par(mfrow=c(2,1),mar=c(3,3,0,0),mgp=c(2,1,0),bty='l')
-plot(time(new.ou2),data.array(new.ou2,"y1"),xlab="",xaxt='n',ylab=expression(y[1]))
+plot(time(new.ou2),obs(new.ou2,"y1"),xlab="",xaxt='n',ylab=expression(y[1]))
 x <- trajectory(new.ou2,params=tm$params)
 lines(time(new.ou2),x["x1",1,],lwd=2)
-plot(time(new.ou2),data.array(new.ou2,"y2"),xlab="time",ylab=expression(y[2]))
+plot(time(new.ou2),obs(new.ou2,"y2"),xlab="time",ylab=expression(y[2]))
 lines(time(new.ou2),x["x2",1,],lwd=2)
 par(op)
 @ 

Modified: pkg/man/basic-probes.Rd
===================================================================
--- pkg/man/basic-probes.Rd	2010-11-07 14:40:36 UTC (rev 410)
+++ pkg/man/basic-probes.Rd	2010-11-07 16:47:23 UTC (rev 411)
@@ -82,7 +82,7 @@
 }
 \value{
   A call to any one of these functions returns a probe function, suitable for use in \code{\link{probe}} or \code{\link{probe.match}}.
-  That is, the function returned by each of these takes a data array (such as comes from a call to \code{\link{data.array}}) as input and returns a single numerical value.
+  That is, the function returned by each of these takes a data array (such as comes from a call to \code{\link{obs}}) as input and returns a single numerical value.
 }
 \details{
   Each of these functions is relatively simple.

Modified: pkg/man/spect.Rd
===================================================================
--- pkg/man/spect.Rd	2010-11-07 14:40:36 UTC (rev 410)
+++ pkg/man/spect.Rd	2010-11-07 16:47:23 UTC (rev 411)
@@ -42,7 +42,7 @@
   }
   \item{vars}{
     optional; names of observed variables for which the power spectrum will be computed.
-    This must be a subset of \code{rownames(data.array(object))}.
+    This must be a subset of \code{rownames(obs(object))}.
     By default, the spectrum will be computed for all observables.
   }
   \item{kernel.width}{



More information about the pomp-commits mailing list