#' @title Generic Method for pred()
#' @param object input containing model data
#' @param ... additional input to pred function
#' @export
pred <- function(object, ...) UseMethod("pred")
#' @title linreg method for pred()
#' @param object input of the class \code{linreg} containing model data
#' @param ... additional input to pred function
#' @export
pred.linreg <- function(object, ...) {
as.vector(object$Fittedvalues)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.