[Depmix-commits] r384 - trunk/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 5 14:11:53 CET 2010


Author: ingmarvisser
Date: 2010-03-05 14:11:53 +0100 (Fri, 05 Mar 2010)
New Revision: 384

Modified:
   trunk/R/depmixfit-class.R
Log:
Added error message for misuse of which argument in summary of mix models.

Modified: trunk/R/depmixfit-class.R
===================================================================
--- trunk/R/depmixfit-class.R	2010-03-05 13:10:59 UTC (rev 383)
+++ trunk/R/depmixfit-class.R	2010-03-05 13:11:53 UTC (rev 384)
@@ -42,7 +42,9 @@
 		ans=switch(which,
 			"all" = 1,
 			"response" = 2,
-			"prior" = 3)
+			"prior" = 3,
+			stop("Invalid 'which' argument in summary of fitted mix model")
+		)
 		if(ans==1|ans==3) {
 			cat("Mixture probabilities model \n")
 			print(object at prior)
@@ -103,7 +105,9 @@
 			"all" = 1,
 			"response" = 2,
 			"prior" = 3,
-			"transition" = 4)
+			"transition" = 4,
+			stop("Invalid 'which' argument in summary of fitted depmix model")
+		)
 		if(ans==1|ans==3) {
 			cat("Initial state probabilties model \n")
 			print(object at prior)


More information about the depmix-commits mailing list