From wdunlap at tibco.com  Sat May  1 00:40:21 2010
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 30 Apr 2010 15:40:21 -0700
Subject: [Rd] na.action(lmObject) -> NULL instead of lmObject$na.action
Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70002DA5173@NA-PA-VBE03.na.tibco.com>

I think the following three calls to na.action() should
return the same thing, but the last returns NULL.

  > d <- data.frame(x=c(1,2,NA,NA,5), y=log(1:5),
row.names=LETTERS[1:5])
  > na.action(na.exclude(d))
  C D
  3 4
  attr(,"class")
  [1] "exclude"
  > na.action(model.frame(y~x, data=d, na.action=na.exclude))
  C D
  3 4
  attr(,"class")
  [1] "exclude"
  > na.action(fit <- lm(y~x, data=d, na.action=na.exclude))
  NULL

lm() returns a list component called "na.action" while
na.exclude() and model.frame() return the same thing as
an attribute called "na.action".

  > fit$na.action
  C D
  3 4
  attr(,"class")
  [1] "exclude"

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 



[Rd] na.action(lmObject) -> NULL instead of lmObject$na.action
William Dunlap