Re: [R] grouped lattice plot with overall regression line

2011-10-16 Thread Bert Gunter
As usual, try reading the Help files! ?panel.lmline -- Bert On Sun, Oct 16, 2011 at 6:50 AM, Weidong Gu wrote: > If you want to draw the global regression line in each panel, you can try > > xyplot(T~A|speaker,data=spk0,layout=c(4,5),type='p',groups=fns), > panel=function(x,y,...){ > panel.xy

Re: [R] grouped lattice plot with overall regression line

2011-10-16 Thread Weidong Gu
If you want to draw the global regression line in each panel, you can try xyplot(T~A|speaker,data=spk0,layout=c(4,5),type='p',groups=fns), panel=function(x,y,...){ panel.xyplot(x,y,...) panel.abline(lm(y~x,data=spk0))}) Weidong Gu 2011/10/16 조혜선 : > I'd like to draw a lattice plot with groups.

[R] grouped lattice plot with overall regression line

2011-10-16 Thread 조혜선
I'd like to draw a lattice plot with groups. The groups (the grouping condition, fns) are successfully marked with separate symbols, using the following code: xyplot(T~A|speaker,groups=fns,pch=1:3,key=list(space="right",points=list(pch=1:3)),type=c("g","p","r")) Here's a hard part. This draws reg