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

From: Andrew Redd <amredd_at_gmail.com>
Date: Mon, 25 Aug 2008 15:07:59 -0500

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

[1] "omit"
> na.action(m)

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.

Andrew Redd

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 25 Aug 2008 - 22:17:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Aug 2008 - 12:37:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive