Skip to content
Back to formatted view

Raw Message

Message-ID: <f8e6ff0504113008326538b2ef@mail.gmail.com>
Date: 2004-11-30T16:32:06Z
From: Hadley Wickham
Subject: adding regression curve to xyplot
In-Reply-To: <41AC9B28.1010401@noaa.gov>

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