Dear R Users,
I have an xyplot() where different plotting symbols are used for subgroups (originally used within S-Plus, but hopefully itīs also applicable to R users).
How can I fit separate regression lines for every subgroup? So far, I can only plot the overall fitted line.
The code looks like this:
trellis.device() sps<-trellis.par.get("superpose.symbol") sps$pch<-1:7 trellis.par.set("superpose.symbol",sps)
spl <- trellis.par.get("superpose.line") ps$lty <- 1:7 trellis.par.set("superpose.line",spl) xyplot(a~b|factor+treatment,
groups=external,data=ownframe,layout=c(2,2),
panel=function(x,y,subscripts,...){panel.superpose(x,y,subscripts,...);panel.lmline(x,y)})
Thank you very much for your help!
Regards Christioph
______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html