powered by
Sample allocation
sample_allocation(prob)
An integer 1:C.
1:C
[numeric(C)] The vector of class probabilities.
numeric(C)
sample_allocation(c(0.5, 0.3, 0.2))
Run the code above in your browser using DataLab