aboutsummaryrefslogtreecommitdiff
path: root/R/coef.gensvm.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/coef.gensvm.R')
-rw-r--r--R/coef.gensvm.R9
1 files changed, 6 insertions, 3 deletions
diff --git a/R/coef.gensvm.R b/R/coef.gensvm.R
index 09febc2..60317aa 100644
--- a/R/coef.gensvm.R
+++ b/R/coef.gensvm.R
@@ -2,7 +2,7 @@
#'
#' @description Returns the model coefficients of the GenSVM object
#'
-#' @param object a \code{gensvm} object
+#' @param fit a \code{gensvm} object
#' @param \dots further arguments are ignored
#'
#' @return The coefficients of the GenSVM model. This is a matrix of size
@@ -35,7 +35,10 @@
#' fit <- gensvm(x, y)
#' V <- coef(fit)
#'
-coef.gensvm <- function(object, ...)
+coef.gensvm <- function(fit, ...)
{
- return(object$V)
+ V <- fit$V
+ name <- c("translation", fit$feature.names)
+ rownames(V) <- name
+ return(V)
}