[R] adding regression curve to xyplot

Deepayan Sarkar deepayan at stat.wisc.edu
Tue Nov 30 17:47:40 CET 2004


On Tuesday 30 November 2004 10:18, Austin, Matt wrote:
> Inside the panel, you have to only use the parts of x and y for each
> unique combination of
> factor(lonLabels[whichLon100])*factor(latLabels[whichLat100])
>
>
>
> So use   "thislm <- lm(x[subscripts]~y[subscripts])" in the panel
> function.

That's not true (at least in this situation). The 'x' and 'y' passed to 
the panel function by xyplot are already the appropriate subsets. 
('groups' would have been passed whole, had it been there.)

Deepayan




More information about the R-help mailing list