wtdTable | R Documentation |
This functions works quite equally as the wtd.table
function
from the Hmisc
package.
wtdTable(x , weights , na.rm = FALSE)
x |
a character or category or factor vector |
weights |
a numeric vector of non-negative weights |
na.rm |
set to |
a frequency table
x <- c(50, 1, 50)
w <- c(1, 4, 1)
wtdTable(x, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.