
Last chance! 50% off unlimited learning
Sale ends in
x
by
a specific vector of weights
.weight(x, weights, digits = 0)
x
, which
contains weight factors. Each value of x
has a
specific assigned weight in weights
.0
, i.e. the returned values are integer values.x
.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