#' Coef method for ridgereg objects
#'
#' @description Extract coefficients from an object of the class "ridgereg".
#' @param object An object of class "ridgereg", generated by a call to \code{\link{ridgereg}}.
#' @param ... additional arguments.
#' @return A vector of coefficients.
#' @examples
#' ridgereg_obj <- ridgereg(Petal.Length~Species, datasets::iris)
#' coef(ridgereg_obj)
#' @export
coef.ridgereg <- function(object,...){
coefs <- as.vector(object$coef)
names(coefs) <- row.names(object$coef)
return(coefs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.