par(mfrow=c(1,2))
x <- runif(100)
y <- rnorm(100)
plot(x, y)
AddLoess(x, y)
# the formula interface is implemented as well:
data(d.pizza)
plot(temperature ~ delivery_min, data=d.pizza)
AddLoess(temperature ~ delivery_min, data=d.pizza)
plot(temperature ~ delivery_min, data=d.pizza)
AddLoess(temperature ~ delivery_min, data=d.pizza, conf.level = 0.99,
args.band = list(col=SetAlpha("red", 0.4), border="black") )
# the default values from scatter.smooth
AddLoess(temperature ~ delivery_min, data=d.pizza,
span=2/3, degree=1, family="symmetric", col="red")
Run the code above in your browser using DataLab