aboutsummaryrefslogtreecommitdiff
path: root/R/predict.gensvm.grid.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/predict.gensvm.grid.R')
-rw-r--r--R/predict.gensvm.grid.R3
1 files changed, 1 insertions, 2 deletions
diff --git a/R/predict.gensvm.grid.R b/R/predict.gensvm.grid.R
index 9d0bc53..e74822d 100644
--- a/R/predict.gensvm.grid.R
+++ b/R/predict.gensvm.grid.R
@@ -49,8 +49,7 @@
predict.gensvm.grid <- function(object, newdata, ...)
{
if (is.null(object$best.estimator)) {
- cat("Error: Can't predict, the best.estimator element is NULL\n")
- return
+ stop("Error: Can't predict, the best.estimator element is NULL\n")
}
return(predict(object$best.estimator, newdata, ...))