[Pomp-commits] r419 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 16 15:26:16 CET 2010


Author: kingaa
Date: 2010-11-16 15:26:16 +0100 (Tue, 16 Nov 2010)
New Revision: 419

Modified:
   pkg/R/skeleton-pomp.R
Log:
- remove one layer of try/catch


Modified: pkg/R/skeleton-pomp.R
===================================================================
--- pkg/R/skeleton-pomp.R	2010-11-16 14:25:43 UTC (rev 418)
+++ pkg/R/skeleton-pomp.R	2010-11-16 14:26:16 UTC (rev 419)
@@ -1,18 +1,9 @@
-skeleton <- function (object, x, t, params, ...)
-  stop("function ",sQuote("skeleton")," is undefined for objects of class ",sQuote(class(object)))
-setGeneric('skeleton')  
+setGeneric("skeleton",function(object,...)standardGeneric("skeleton"))
 
 ## evaluate the measurement model density function
 setMethod(
           'skeleton',
           'pomp',
-          function (object, x, t, params, ...) {
-            x <- try(
-                     .Call(do_skeleton,object,x,t,params),
-                     silent=FALSE
-                     )
-            if (inherits(x,'try-error'))
-              stop("skeleton error: error in user ",sQuote("skeleton"),call.=FALSE)
-            x
-          }
+          function (object, x, t, params, ...)
+            .Call(do_skeleton,object,x,t,params),
           )



More information about the pomp-commits mailing list