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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 18 18:47:40 CEST 2013


Author: maarten
Date: 2013-04-18 18:47:40 +0200 (Thu, 18 Apr 2013)
New Revision: 579

Modified:
   pkg/depmixS4/R/depmixsim-class.R
Log:
fixed problem when calling sim() on a fitted (dep)mix model (this gave an error) by adding an "as" method to convert from (dep)mix.fitted to (dep)mix.sim

Modified: pkg/depmixS4/R/depmixsim-class.R
===================================================================
--- pkg/depmixS4/R/depmixsim-class.R	2013-01-29 15:42:26 UTC (rev 578)
+++ pkg/depmixS4/R/depmixsim-class.R	2013-04-18 16:47:40 UTC (rev 579)
@@ -14,3 +14,10 @@
 	)
 )
 
+setAs("mix.fitted","mix.sim",def=function(from) {
+  as(as(from,"mix"),"mix.sim")
+})
+
+setAs("depmix.fitted","depmix.sim",def=function(from) {
+  as(as(from,"mix"),"mix.sim")
+})
\ No newline at end of file



More information about the depmix-commits mailing list