Skip to content
Prev 78554 / 398502 Next

problems with loess

Hi all,

I was unable to obtained a smoothed line using the loess function.
I used the following code reported in the examples of R documentation:

cars.lo <- loess(dist ~ speed, cars)

Then I tried to plot both the data and the smoothed line

plot(cars)
lines(cars.lo)

but what I obtained is simply a broken line joining all the data points.
I tried with different spans, but the results did not change.


Does anyone know what's going wrong? 


Thanks

Dimitri




platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    2.0