[R] Problem with xtabs(), exclude=NULL, and counting NA's

Webb Sprague webb.sprague at gmail.com
Sat Sep 5 07:21:16 CEST 2009


>> xtabs(~wkhp, x, exclude=NULL, na.action=na.pass)
> wkhp
>  20   30   40   45   60 <NA>
>   1    1   10    1    3    4

Thanks!  I must say that this is slightly odd behavior to require both
na.action= AND exclude=.  Does anyone know of a justification?
Shouldn't it be changed?  <vent> Ah well, if R were internally
consistent or corresponded to typical programming Unix practices, it
just wouldn't feel the same ... </vent>

Cheers!

> --
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>




More information about the R-help mailing list