R/panel.lm.R

panel.lm <-
function (x, y, model, fits, ...) 
{
    if (missing(fits)) {
        if (missing(model)) {
            model <- lm(y ~ x, ...)
        }
        fits <- fitted(model)
    }
    panel.xyplot(x[order(x)], fits[order(x)], type = "l", lwd = 2, 
        ...)
    panel.xyplot(x, y, ...)
}

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 2, 2019, 5:53 p.m.