From 4df4236f22489a6eabc51deeb0c22dce8c7748a4 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 30 Mar 2018 22:03:53 +0100 Subject: Return invisibly on error --- R/plot.gensvm.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'R/plot.gensvm.R') diff --git a/R/plot.gensvm.R b/R/plot.gensvm.R index e79881f..ac40ccf 100644 --- a/R/plot.gensvm.R +++ b/R/plot.gensvm.R @@ -65,7 +65,7 @@ plot.gensvm <- function(fit, x, y.true=NULL, with.margins=TRUE, { if (!(fit$n.classes %in% c(2,3))) { cat("Error: Can only plot with 2 or 3 classes\n") - invisible(NULL) + return(invisible(NULL)) } # Sanity check -- cgit v1.2.3