R/plotres.R

Defines functions plotres

Documented in plotres

#' 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')
}
unimi-dse/2d3bd55d documentation built on Feb. 17, 2020, 4:16 a.m.