[R] svytable including NAs

David Winsemius dwinsemius at comcast.net
Wed Sep 14 15:49:33 CEST 2011

On Sep 14, 2011, at 6:12 AM, tesutton wrote:

> Dear all
> I'm creating two way tables based on weighted survey data using  
> svytable and want to include NAs as a level in the table.
> For unweighted data I use table(..., useNA="ifany"). Is there any  
> equivalent for svytable?
> If not, is there a solution using a different function?

I don't know the answer to the first question, but my first experiment  
to solve would be to redefine your factors with:

  fac <- factor(fac, exclude=NULL)
    ... so that you get an <NA> level and label rather than having NAs.


David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list