wpct: Provides a weighted table of percentages for any variable.
Description
wpct produces a weighted table of the proportion of data in each category for any variable. This is simply a weighted frequency table divided by its sum.
Usage
wpct(x, weight=NULL, na.rm=TRUE, ...)
Arguments
x
x should be a vector for which a set of proportions is desired.
weight
weight is a vector of weights to be used to determining the weighted proportion in each category of x.
na.rm
If na.rm is true, missing data will be dropped. If na.rm is false, missing data will return an error.
...
... (optional) Additional arguments to be passed on to wtd.table.
Value
A table object of length equal to the number of separate values of x.