aboutsummaryrefslogtreecommitdiff
path: root/R/plot.gensvm.R
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-30 17:36:06 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-30 17:36:06 +0100
commitd87788f7e37c3c63ed0ad06c65a602ab6b744dd1 (patch)
tree571321ce3a055de8ef41a306c595a0f1f00406c9 /R/plot.gensvm.R
parentset feature names for coef result (diff)
downloadrgensvm-d87788f7e37c3c63ed0ad06c65a602ab6b744dd1.tar.gz
rgensvm-d87788f7e37c3c63ed0ad06c65a602ab6b744dd1.zip
return invisibly
Diffstat (limited to 'R/plot.gensvm.R')
-rw-r--r--R/plot.gensvm.R8
1 files changed, 4 insertions, 4 deletions
diff --git a/R/plot.gensvm.R b/R/plot.gensvm.R
index a41c91e..e79881f 100644
--- a/R/plot.gensvm.R
+++ b/R/plot.gensvm.R
@@ -65,14 +65,14 @@ 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")
- return(NULL)
+ invisible(NULL)
}
# Sanity check
if (ncol(x) != fit$n.features) {
cat("Error: Number of features of fitted model and testing data
disagree.\n")
- return(NULL)
+ invisible(NULL)
}
x.train <- fit$X.train
@@ -80,12 +80,12 @@ plot.gensvm <- function(fit, x, y.true=NULL, with.margins=TRUE,
cat("Error: The training data is needed to plot data for ",
"nonlinear GenSVM. This data is not present in the fitted ",
"model!\n", sep="")
- return(NULL)
+ invisible(NULL)
}
if (!is.null(x.train) && ncol(x.train) != fit$n.features) {
cat("Error: Number of features of fitted model and training data ",
"disagree.\n", sep="")
- return(NULL)
+ invisible(NULL)
}
x <- as.matrix(x)