[R] adding regression curve to xyplot

hadley wickham h.wickham at gmail.com
Tue Nov 30 17:32:06 CET 2004


If you only want a simple linear regression, you might also want to try

 xyplot(t~s|factor(lonLabels[whichLon100])*factor(latLabels[whichLat100]),
+   data=P100,pch=".", type =c("p","r")

 - type "r" will automatically fit and plot the regression line for you.

Hadley




More information about the R-help mailing list