#' Return predictions of a linreg object
#' @description \code{pred} returns the predictions of a linreg object.
#' @param object A linreg object.
#' @param ... Further arguments passed to or from other methods.
#' @return Return a named vector with predictions.
#' @examples
#' pred(linreg(Petal.Length ~ Species, iris))
#' @export
#'
# pred
pred.linreg <- function(object, ...){
res <- c(object[[5]])
names(res) <- rownames(object[[5]])
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.