aboutsummaryrefslogtreecommitdiff
path: root/R/gensvm.train.test.split.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/gensvm.train.test.split.R')
-rw-r--r--R/gensvm.train.test.split.R3
1 files changed, 1 insertions, 2 deletions
diff --git a/R/gensvm.train.test.split.R b/R/gensvm.train.test.split.R
index cd40ecc..680743c 100644
--- a/R/gensvm.train.test.split.R
+++ b/R/gensvm.train.test.split.R
@@ -60,8 +60,7 @@ gensvm.train.test.split <- function(x, y=NULL, train.size=NULL, test.size=NULL,
return.idx=FALSE)
{
if (!is.null(y) && dim(as.matrix(x))[1] != dim(as.matrix(y))[1]) {
- cat("Error: First dimension of x and y should be equal.\n")
- return
+ stop("Error: First dimension of x and y should be equal.\n")
}
n.objects <- dim(as.matrix(x))[1]