[R] Inconsistence in specifying action for missing data

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Sep 4 09:59:54 CEST 2005


Martin Maechler <maechler at stat.math.ethz.ch> writes:

> >>>>> "Duncan" == Duncan Murdoch <murdoch at stats.uwo.ca>
> >>>>>     on Sat, 03 Sep 2005 11:40:18 -0400 writes:
> 
>     Duncan> John Sorkin wrote:
>     >> A question for R (and perhaps S and SPlus) historians.
>     >> 
>     >> Does anyone know the reason for the inconsistency in the
>     >> way that the action that should be taken when data are
>     >> missing is specified? There are several variants,
>     >> na.action, na.omit, "T", TRUE, etc. I know that a foolish
>     >> consistency is the hobgoblin of a small mind, but
>     >> consistency can make things easier.
>     >> 
>     >> My question is not meant as a complaint. I very much
>     >> admire the R development team. I simply am curious.
> 
>     Duncan> R and S have been developed by lots of people, over
>     Duncan> a long time.  I think that's it.
> 
> yes, but there's a bit more to it.
> 
> First, the question was "wrong" (don't you just hate such an answer?):
> A more interesting  question would have asked why there was 
>   'na.rm = {TRUE, FALSE}' 
> on one hand and
>   'na.action =  {na.omit, na.replace, .....}'
> on the other hand,
> since only these two appear as function *arguments* 
> {at least in `decent' S and R functions}.

So cor() is "indecent" (with its use= argument)? ;-)


-- 
   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