diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2018-03-30 17:36:06 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2018-03-30 17:36:06 +0100 |
| commit | d87788f7e37c3c63ed0ad06c65a602ab6b744dd1 (patch) | |
| tree | 571321ce3a055de8ef41a306c595a0f1f00406c9 /R/predict.gensvm.R | |
| parent | set feature names for coef result (diff) | |
| download | rgensvm-d87788f7e37c3c63ed0ad06c65a602ab6b744dd1.tar.gz rgensvm-d87788f7e37c3c63ed0ad06c65a602ab6b744dd1.zip | |
return invisibly
Diffstat (limited to 'R/predict.gensvm.R')
| -rw-r--r-- | R/predict.gensvm.R | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/R/predict.gensvm.R b/R/predict.gensvm.R index 133b40e..558f80b 100644 --- a/R/predict.gensvm.R +++ b/R/predict.gensvm.R @@ -54,7 +54,7 @@ predict.gensvm <- function(fit, x.test, ...) if (ncol(x.test) != 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 @@ -62,12 +62,12 @@ predict.gensvm <- function(fit, x.test, ...) cat("Error: The training data is needed to compute predictions 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") - return(NULL) + invisible(NULL) } if (fit$kernel == 'linear') { |
