wtd_table {blocs} | R Documentation |
Weighted frequency table or proportions
wtd_table(
...,
weight = NULL,
na.rm = FALSE,
prop = FALSE,
return_tibble = FALSE,
normwt = FALSE
)
... |
vectors of class factor or character, or a list/data.frame of such vectors. |
weight |
optional vector of weights. The default uses uniform weights of 1. |
na.rm |
logical, whether to remove NA values. |
prop |
logical, whether to return proportions or counts. Default returns counts. |
return_tibble |
logical, whether to return a tibble or named vector. |
normwt |
logical, whether to normalize weights such that they sum to 1. |
a vector or tibble of counts or proportions by group