na.action=na.exclude does this. On Tue, 14 Jan 2003 [EMAIL PROTECTED] wrote:
> Hello, > > I have a data frame and want to do the following. > > Do a regression of one variable versus another: > > fit <- lm(a ~ b) > > Then I would like to plot the residuals of this fit versus a third variable: > > bwplot(residuals(fit) ~ group) > > This fails, if a or b contain NAs, because the data in the residuals() - > vector are not aligned anymore to the data in the original data frame. > > Is there a way to solve this issue? > > Regards and thanks for your help > Klaus > > ______________________________________________ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
