[Pomp-commits] r455 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 4 23:32:39 CEST 2011


Author: kingaa
Date: 2011-05-04 23:32:39 +0200 (Wed, 04 May 2011)
New Revision: 455

Modified:
   pkg/R/trajectory-pomp.R
Log:
- 'trajectory' now gives a more informative error when no skeleton is present


Modified: pkg/R/trajectory-pomp.R
===================================================================
--- pkg/R/trajectory-pomp.R	2011-05-04 21:31:45 UTC (rev 454)
+++ pkg/R/trajectory-pomp.R	2011-05-04 21:32:39 UTC (rev 455)
@@ -55,7 +55,7 @@
   }
   paramnames <- rownames(params)
   if (is.null(paramnames))
-    stop("pfilter error: ",sQuote("params")," must have rownames",call.=FALSE)
+    stop("trajectory error: ",sQuote("params")," must have rownames",call.=FALSE)
   params <- as.matrix(params)
 
   x0 <- init.state(object,params=params,t0=t0)
@@ -65,6 +65,9 @@
   dimnames(x0) <- list(statenames,NULL,NULL)
   
   type <- object at skeleton.type          # map or vectorfield?
+  
+  if (is.na(type))
+    stop("trajectory error: no skeleton specified",call.=FALSE)
 
   if (type=="map") {
 



More information about the pomp-commits mailing list