>> I must say that this is slightly odd behavior to require both >> na.action= AND exclude=. Does anyone know of a justification?
Not strange at all. ?options na.action, sub head "Options set in package stats." You need to override the default setting. ws-7 wrote: > >>> 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 >> >> > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > -- View this message in context: http://www.nabble.com/Problem-with-xtabs%28%29%2C-exclude%3DNULL%2C-and-counting-NA%27s-tp25304142p25305878.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.