diff options
Diffstat (limited to 'R/coef.gensvm.R')
| -rw-r--r-- | R/coef.gensvm.R | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/R/coef.gensvm.R b/R/coef.gensvm.R index f0369ee..3262833 100644 --- a/R/coef.gensvm.R +++ b/R/coef.gensvm.R @@ -42,7 +42,9 @@ coef.gensvm <- function(object, ...) { V <- object$V x <- eval.parent(object$call$x) - name <- c("translation", colnames(x)) - rownames(V) <- name + if (!is.null(colnames(x)) && length(colnames(x)) == dim(V)[1]) { + name <- c("translation", colnames(x)) + rownames(V) <- name + } return(V) } |
