x<-c(201, 208, 208, 212, 214, 216, 217, 220, 221, 226) y<-c(3, 23, 62, 105, 147, 185, 243, 268, 314, 350) plot(x,y) lines(loess.smooth(x,y)) lines(supsmu(x,y),lty=2) lines(smooth.spline(x,y),lty=3) lines(ksmooth(x,y), lty=4) legend(200,350,c("loess", "supsmu","smooth.spline", "kernel.smooth"), lty=1:4) x<-scan("C:\\Courses\\math664\\datax.csv") scan allows one to get the data from the file datax.csv (Excel file) into the variable x.