[Pomp-commits] r367 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Oct 5 23:11:24 CEST 2010
Author: kingaa
Date: 2010-10-05 23:11:20 +0200 (Tue, 05 Oct 2010)
New Revision: 367
Modified:
pkg/R/simulate-pomp.R
Log:
- minor changes
Modified: pkg/R/simulate-pomp.R
===================================================================
--- pkg/R/simulate-pomp.R 2010-10-05 20:42:51 UTC (rev 366)
+++ pkg/R/simulate-pomp.R 2010-10-05 21:11:20 UTC (rev 367)
@@ -82,7 +82,7 @@
retval <- lapply(
seq_len(nreps),
function (rep) {
- po <- as(object,'pomp') # copy the pomp object
+ po <- as(object,'pomp')
po at t0 <- t0
po at times <- times
po at params <- params[,rep]
@@ -93,19 +93,17 @@
po
}
)
- if (nreps==1) {
- retval <- retval[[1]]
- }
- } else if (!obs && states) { # return states only
+ if (nreps==1) retval <- retval[[1]]
+ } else if (!obs && states) # return states only
retval <- x
- } else if (obs && !states) { # return only observations
+ else if (obs && !states) # return only observations
retval <- y
- } else { # return both states and observations
+ else # return both states and observations
retval <- list(
states = x,
obs = y
)
- }
+
retval
}
More information about the pomp-commits
mailing list