R/resid_linreg.R

Defines functions resid.linreg resid

Documented in resid resid.linreg

#' @title S3 Generic function
#' @param x an object
#' @export

# generic
resid <- function(x) {UseMethod("resid")}

#' @title Return Linear Regression Residuals
#' @description An S3 function to return residuals from a \code{linreg} object
#' @param x an object of class \code{linreg}
#' @return a vector containing the residuals
#' @export

# s3 method
resid.linreg <- function(x) {x$residuals}
shana299/tryy documentation built on Dec. 23, 2021, 1:19 a.m.