Skip to content
Prev 77402 / 398502 Next

xyplot and abline

On Sat, 17 Sep 2005, Marc Bernard wrote:

            
Use a panel function and call panel.lmline from it. Something like

mypanel <- function (x, y, ...)
{
    panel.xyplot(x,y, ...)
    panel.lmline(x,y, ...)
}

xyplot(y  ~  x| age.cut, xlab="x", ylab="y", panel=mypanel)