[R] Add values of rlm coefficients to xyplot

PtitBleu ptit_bleu at yahoo.fr
Mon Nov 8 17:02:36 CET 2010


Hello,

I have a simple xyplot with rlm lines.
I would like to add the a and b coefficients (y=ax+b) of the rlm calculation
in each panel.
I know I can do it 'outside' the xyplot command but I would like to do all
at the same time. 

I found some posts with the same question, but no answer.

Is it impossible ?

Thanks in advance for your help.
Ptit Bleu.

x11(15,12)
xyplot(df1$col2 ~ df1$col3 | df1$Name,
panel = function(x, y,...) {
                panel.abline(h=seq(20,40,5), col="gray")
                panel.abline(v=seq(-10,60,5), col="gray")
                panel.xyplot(x, y, type="p", col="red", pch=20,...)
                panel.abline(rlm(y ~ x), col="blue")
                }, scales=list(cex=1.2),
                 xlab=list("X", cex=1.4), ylab=list("Y", cex=1.4),
xlim=c(-10,60), ylim=c(20,40))

-- 
View this message in context: http://r.789695.n4.nabble.com/Add-values-of-rlm-coefficients-to-xyplot-tp3032166p3032166.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list