[Depmix-commits] r685 - pkg/depmixS4/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 15 17:21:27 CET 2020


Author: maarten
Date: 2020-01-15 17:21:27 +0100 (Wed, 15 Jan 2020)
New Revision: 685

Modified:
   pkg/depmixS4/R/depmixfit.R
Log:
re-added conversion from mix to mix-fittted in depmixfit.R

Modified: pkg/depmixS4/R/depmixfit.R
===================================================================
--- pkg/depmixS4/R/depmixfit.R	2020-01-15 15:26:33 UTC (rev 684)
+++ pkg/depmixS4/R/depmixfit.R	2020-01-15 16:21:27 UTC (rev 685)
@@ -147,8 +147,11 @@
 		    ...
 		)
 		
-		if(is(object,"depmix")) object <- as(object,"depmix.fitted") # class(object) <- "depmix.fitted"
-#		if(is(object,"mix")) object <- as(object,"mix.fitted") #  class(object) <- "mix.fitted"
+		if(is(object,"depmix")) {
+		  object <- as(object,"depmix.fitted") # class(object) <- "depmix.fitted"
+		} else {
+		  if(is(object,"mix")) object <- as(object,"mix.fitted") #  class(object) <- "mix.fitted"
+		}
 		
 		# convergence info
 		object at message <- result$message
@@ -210,8 +213,11 @@
 		    ...
 		)
 		
-		if(is(object, "depmix"))  object <- as(object,"depmix.fitted") #  class(object) <- "depmix.fitted"
-#		if(is(object, "mix")) object <- as(object,"mix.fitted") #  class(object) <- "mix.fitted"
+		if(is(object, "depmix"))  {
+		  object <- as(object,"depmix.fitted") #  class(object) <- "depmix.fitted"
+		} else if(is(object, "mix")) {
+		  object <- as(object,"mix.fitted") #  class(object) <- "mix.fitted"
+		}
 		
 		object at message <- c(res$convergence," (0 is good in Rsolnp, check manual for other values)")
 		



More information about the depmix-commits mailing list