#' plotres
#' @description This function plots the residuals against the predicted model
#'
#' @param x is the dataset on which the function calculates the residual and the predicted value
#' @export
#' @import stats graphics
#' @examples
#' plotres(linear.r())
#' @return a plot
plotres <- function(x) {
plot(predict(x), residuals(x))
abline(a=0,b=0, col ='red')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.