powered by
var
weights
weight(var, weights)
weight2
v <- sample(1:4, 20, TRUE) table(v) w <- abs(rnorm(20)) table(weight(v, w))
Run the code above in your browser using DataLab