% File src/library/stats/man/line.Rd % Part of the R package, http://www.R-project.org % Copyright 1995-2012 R Core Team % Distributed under GPL 2 or later \name{line} \alias{line} \alias{residuals.tukeyline} \title{Robust Line Fitting} \description{ Fit a line robustly as recommended in \emph{Exploratory Data Analysis}. } \usage{ line(x, y) } \arguments{ \item{x, y}{the arguments can be any way of specifying x-y pairs. See \code{\link{xy.coords}}.} } \details{ Cases with missing values are omitted. Long vectors are not supported. } \value{ An object of class \code{"tukeyline"}. Methods are available for the generic functions \code{coef}, \code{residuals}, \code{fitted}, and \code{print}. } \references{ Tukey, J. W. (1977). \emph{Exploratory Data Analysis}, Reading Massachusetts: Addison-Wesley. } \seealso{ \code{\link{lm}}. } \examples{ require(graphics) plot(cars) (z <- line(cars)) abline(coef(z)) ## Tukey-Anscombe Plot : plot(residuals(z) ~ fitted(z), main = deparse(z$call)) } \keyword{robust} \keyword{regression}