[R] smooth curves

Michael A. Miller mmiller3 at iupui.edu
Fri Dec 6 15:33:03 CET 2002


>>>>> "guerreau" == guerreau  <alain.guerreau at fnac.net> writes:

    > I would like to draw smooth curves instead of polygons.  I
    > could not find any spline function to do that : given an x
    > and a y vectors, they all take the x in increasing order.
    > Is there a function to draw a smooth curve through a set of
    > points in any order ?

The locfit package local regression, likelihood and density
estimation) can be used to that:

library(locfit)
data(ethanol)
fit <- locfit(NOx~E,data=ethanol)
plot(NOx~E,data=ethanol)
lines(fit)


Mike

-- 
Michael A. Miller                               mmiller3 at iupui.edu
  Imaging Sciences, Department of Radiology, IU School of Medicine




More information about the R-help mailing list