R/resid.R

Defines functions residuals.linreg

Documented in residuals.linreg

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

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