aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/gensvm.R5
1 files changed, 5 insertions, 0 deletions
diff --git a/R/gensvm.R b/R/gensvm.R
index 0464322..425bf9b 100644
--- a/R/gensvm.R
+++ b/R/gensvm.R
@@ -116,6 +116,11 @@ gensvm <- function(X, y, p=1.0, lambda=1e-8, kappa=0.0, epsilon=1e-6,
{
call <- match.call()
+ if (dim(as.matrix(y))[2] > 1) {
+ cat("Error: y can not have more than one column\n")
+ return(invisible(NULL))
+ }
+
# Generate the random.seed value in R if it is NULL. This way users can
# reproduce the run because it is returned in the output object.
if (is.null(random.seed))