I\'m trying to draw a smooth curve in R. I have the following simple toy data:
R
> x [1] 1 2 3 4 5 6 7 8 9 10 > y [1] 2 4 6 8
the qplot() function in the ggplot2 package is very simple to use and provides an elegant solution that includes confidence bands. For instance,
qplot(x,y, geom='smooth', span =0.5)
produces