#' 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.