From amredd at gmail.com  Mon Aug 25 22:07:59 2008
From: amredd at gmail.com (Andrew Redd)
Date: Mon, 25 Aug 2008 15:07:59 -0500
Subject: [Rd] na.action does not return na.action element of lm object
Message-ID: <4d17c3500808251307nf113b93jaae497c42833cb7c@mail.gmail.com>

I'm not sure if this is the official behavior but I would expect the
na.action function applied to a lm object to return the na.action.
Here is what I mean.

> x<-0:10
> y<-x+rnorm(10)
Warning message:
In x + rnorm(10) :
  longer object length is not a multiple of shorter object length
> y[5]<-NA
> m<-lm(y~x)
> m$na.action
5
5
attr(,"class")
[1] "omit"
> na.action(m)
NULL

I would expect na.action(m) to return m$na.action.  This is simple
enough to fix with
na.action.lm<-function(object,...)object$na.action
but I would expect that this would already be included in the base.
Is there a reason that it is not?  I did a search through the archives
but did not turn up anything relevant.

Thanks,
Andrew Redd



[Rd] na.action does not return na.action element of lm object
Andrew Redd