[Yuima-commits] r304 - pkg/yuima/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 23 04:28:07 CEST 2014


Author: iacus
Date: 2014-04-23 04:28:04 +0200 (Wed, 23 Apr 2014)
New Revision: 304

Modified:
   pkg/yuima/R/yuima.R
Log:
updated show

Modified: pkg/yuima/R/yuima.R
===================================================================
--- pkg/yuima/R/yuima.R	2014-04-23 01:18:17 UTC (rev 303)
+++ pkg/yuima/R/yuima.R	2014-04-23 02:28:04 UTC (rev 304)
@@ -274,6 +274,7 @@
 setMethod("show", "yuima",
 function(object){
     
+    myenv <- new.env()
     mod <- object at model
     has.drift <- FALSE
     has.diff <- FALSE
@@ -292,7 +293,9 @@
     if( has.drift | has.diff ) is.wienerdiff <- TRUE
     if( has.fbm  ) is.fracdiff <- TRUE
     if( has.levy ) is.jumpdiff <- TRUE
-    if( try(eval(mod at diffusion[[1]]), silent=TRUE) == 0){
+    tmp <- try(eval(mod at diffusion[[1]], env=myenv), silent=TRUE)
+
+    if( as.character(mod at diffusion[[1]]) == "(0)" ){
      has.diff <- FALSE
      is.wienerdiff <- FALSE
      is.fracdiff <- FALSE



More information about the Yuima-commits mailing list