Re: [R] Use generalised additive model to plot curve

2010-12-14 Thread Gavin Simpson
On Tue, 2010-12-14 at 22:36 +, e-letter wrote: > Readers, > > I have been reading 'the r book' by Crawley and think that the > generalised additive model is appropriate for this problem. The > package 'gam' was installed using the command (as root) > > install.package("gam") > ... > library(g

Re: [R] Use generalised additive model to plot curve

2010-12-14 Thread Bill.Venables
Dear Lurker, If all you art trying to do is to plot something, isn't all you need something like the following? x <- c( 30, 50, 80, 90, 100) y <- c(160, 180, 250, 450, 300) sp <- spline(x, y, n = 500) plot(sp, type = "l", xlab = "x", ylab = "y", las = 1, main = "A Spline Interpolation")