[R] simple question

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Wed Jul 1 11:07:50 CEST 2009


David Hugh-Jones wrote:
> Hello all
> 
> I have a fit resulting from a call to glm. 

Now, now, no reason to overreact...

("Women can have fits upstairs" -- sign in Indian tailor shop)

> Now, I would like to extract the
> model frame MF, and add some variables
> from the original data frame DF. To do this, I need to know which rows in DF
> correspond to rows in MF (since some were dropped by na.omit). How can I do
> this? It's probably simple but the information is hard to find.

na.omit leaves a footprint in, e.g.,
attr(na.omit(airquality),"na.action"). This can be used for (negative)
indexing.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907




More information about the R-help mailing list