Displaying 1 result from an estimated 1 matches for "wkhp".
Did you mean:
whp
2009 Sep 04
1
Problem with xtabs(), exclude=NULL, and counting NA's
...d have to
install a more recent version in my home directory to fix this, so I don't
really want to.
Note also that I know various approaches to working around the problem, so I
don't need help with that, just with whether or not xtabs works with nas or not.
TIA
$ x=as.data.frame(list(wkhp=WKHP[1:20]))
$ x
wkhp
1 NA
2 NA
3 60
4 NA
5 20
6 40
7 30
8 40
9 40
10 40
11 45
12 40
13 40
14 NA
15 40
16 40
17 40
18 60
19 60
20 40
$ xtabs(~wkhp, x)
wkhp
20 30 40 45 60
1 1 10 1 3
$ xtabs(~wkhp, x, exclude=NULL) # Look -- no counts of NAs!...