Re: [R] question in xyplot of lattice

2007-12-07 Thread Deepayan Sarkar
On 12/7/07, Aimin Yan <[EMAIL PROTECTED]> wrote: > I try to make a xyplot like the following: > > xyplot(y1+y2~id|groups, ...) > > I also want to calculate cor(y1,y2) in each group, print it on each panel. > > Does anyone know how to write panel function for this? This should work: panel.cor <- f

[R] question in xyplot of lattice

2007-12-07 Thread Aimin Yan
I try to make a xyplot like the following: xyplot(y1+y2~id|groups, ...) I also want to calculate cor(y1,y2) in each group, print it on each panel. Does anyone know how to write panel function for this? Thanks, Aimin __ R-help@r-project.org mailing l