wtdTable {eatTools} | 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)