addSmoothSplineLine: Add a fitted cubic smoothing spline to the supplied graph

View source: R/addSmoothSplineLine.r

addSmoothSplineLineR Documentation

Add a fitted cubic smoothing spline to the supplied graph

Description

Add a fitted cubic smoothing spline to the supplied graph

Usage

addSmoothSplineLine(y, x = NULL, col = "blue", lwd = 2, ...)

Arguments

y

yvalues

x

(optional) x values

Details

...

Author(s)

JuG

Examples

n <- 1e3
dat <- data.frame(
  x = (1:n)+50,
  y = sin(seq(0, 5*pi, length.out = n)) + rnorm(n=n, mean = 0, sd=0.1)
)
plot(dat)
addSmoothSplineLine(y=dat$y,x=dat$x,col='blue')

jgodet/utilitR documentation built on May 16, 2024, 12:01 p.m.