Displaying 1 result from an estimated 1 matches for "ethnicfactor".
2006 Oct 04
2
Tabulation and missing values
...an/Other", "Asian", "Pacific")
### I don't want the categories in the default order
### I also want to be able to include or exclude NA
### argument exclude controls inclusion of NA
table(EthnicCode)
table(EthnicCode,exclude=NULL)
### Creating a factor allows reordering
EthnicFactor <- factor(EthnicCode, exclude="")
levels(EthnicFactor) <- list("Maori"="Maori","Pacific"="Pacific",
"Asian"="Asian",
"Europ/Other"="European/O...