R/lowess3.R

Defines functions lowess3

Documented in lowess3

#' Draws a matrix layout with 3 lowess plots of variyng f-values
#'
#' @param df Data frame to be plotted (must have 2 columns)
#'
#' @return
#' @export
#'
#' @examples
#' lowess3(spruce)
#' See my Lab 3 implementation.
lowess3 <- function(df) {
  library(s20x)

  f = names(df)
  x = f[1]
  y = f[2]

  layout(matrix(c(1,2,3), 3, 1, byrow = TRUE), heights=c(3,3,3))
  trendscatter(y~x,f=0.5, data=df)
  trendscatter(y~x,f=0.6, data=df)
  trendscatter(y~x,f=0.7, data=df)
}
matthewCmatt/MATH4753CARROLL documentation built on April 20, 2021, 7:25 p.m.