View source: R/addSmoothSplineLine.r
addSmoothSplineLine | R Documentation |
Add a fitted cubic smoothing spline to the supplied graph
addSmoothSplineLine(y, x = NULL, col = "blue", lwd = 2, ...)
y |
yvalues |
x |
(optional) x values |
...
JuG
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.