I'm trying to produce regression lines on each panel of a trellis using
panel.abline.
I can make it work when there is a single plot, by inserting:
panel=function(x,y,...){panel.xyplot(x,y,...); panel.abline(lm(y~x))}
into the script. Could anyone advise me on how to make it work for each
panel of a multi-panel trellis ?
I've tried replacing the regression object with:
lmList(y~x | z, data=df )
where z is the conditioning variable, but I can't work out how to pass the
parameters into the panel function. Can anyone help ? Many thanks.
(Splus 6 release 2)
Jonathan Dakin
Imperial College
|