data <- read.csv("faithful.csv")
with(data, plot(waiting, eruptions))
library(splines)
fit <- lm(eruptions ~ ns(waiting, 4), data = data)
xpts <- with(data, seq(min(waiting), max(waiting), len = 100))
lines(xpts, predict(fit, data.frame(waiting = xpts)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.