R/get_glmnet_coef.R

#' Get coeficients without intercept from glmnet model 
#' 
#' @param fit glmnet model
#' @importFrom stats coef
#' @export
get_glmnet_coef <- function(fit) {
  coef_fit <- coef(fit$model)
  coef_fit@Dimnames[[1]][-1][coef_fit@i[-1]]
}
rmsharp/stepwiser documentation built on May 26, 2019, 9:33 a.m.