[R] Smooth line in graph

Nestor Fernandez nestor at ual.es
Thu Sep 20 10:37:09 CEST 2007


Both worked, thanks!

N. Fernandez

> Katharine Mullen:
>
> require(splines)
> x<-1:5
> y <- c(0.31, 0.45, 0.84, 0.43, 0.25)
> yy <-predict(interpSpline(x, y))
> plot(x, y)
> lines(yy)
>   

> Greg Snow:
> lines(spline(x,y, method='n', n=250))



More information about the R-help mailing list