R/grab_residual.r

Defines functions grab_resids

Documented in grab_resids

#' @title Grab the residuals
#' @description This is a simple function to grab the residuals of
#' a linear model.
#' @param lm_obj the linear model object created by the lm() function.
#' @examples
#' library(palmerpenguins)
#' fit <- lm(bill_length_mm ~ ., data = penguins[, -8])
#' grab_resids(fit)
#' @export
grab_resids <- function(lm_obj) {
  lm_obj$residuals
}
nixgank-wang/bis557 documentation built on Dec. 26, 2020, 9:54 p.m.