prob2IntFreq {humanleague} | R Documentation |
This function will generate the closest integer vector to the probabilities scaled to the population.
prob2IntFreq(pIn, pop)
pIn |
a numeric vector of state occupation probabilities. Must sum to unity (to within double precision epsilon) |
pop |
the total population |
an integer vector of frequencies that sum to pop, and the RMS difference from the original values.
prob2IntFreq(c(0.1,0.2,0.3,0.4), 11)