[R] Odp: connecting points into a smooth curve

Petr PIKAL petr.pikal at precheza.cz
Mon Nov 1 11:50:17 CET 2010


Hi

r-help-bounces at r-project.org napsal dne 01.11.2010 07:18:47:

> 
> If I have, say, five scatter points and want to connect them together 
into a
> smooth curve.

As you are not much specific about what you consider "smooth curve" here 
are some options

use some model ?lm and plot predicted values with line
??smooth will give you many functions for smoothing data e.g.
?loess
?supsmu
?spline
and some others

Regards
Petr

> I did plot(x,y,type="l"), but the graph is five segments connecting with
> each other, but not a smooth curve. 
> I wonder if there is a line type that is a curve. Thanks!
> 
> 
> -- 
> View this message in context: 
http://r.789695.n4.nabble.com/connecting-points-
> into-a-smooth-curve-tp3021796p3021796.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list