From 7a7d33171a3438f2ad3ee13eaff64fbca6d8dd13 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Apr 2018 15:07:00 -0400 Subject: Fix for when colnames are NULL --- R/coef.gensvm.R | 6 ++++-- 1 file 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) } -- cgit v1.2.3