#' 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.