R/coef.R

Defines functions coef.linreg

Documented in coef.linreg

#' Return the coefficients of a linreg object
#' @description \code{resid} returns the coefficients of a linreg object.
#' @param object A linreg object.
#' @param ... Further arguments passed to or from other methods.
#' @return Return coefficients.
#' @examples
#' coef(linreg(Petal.Length ~ Species, iris))
#' @export
#'

# coef
coef.linreg <- function(object, ...){
  res <- c(object[[4]])
  names(res) <- rownames(object[[4]])
  return(res)
}
Sidryd/lab4sidjac documentation built on Oct. 17, 2020, 11:05 p.m.