integerise {humanleague} | R Documentation |
Generate integer population from a fractional one where the 1-d partial sums along each axis have an integral total
Description
This function will generate the closest integer array to the fractional population provided, preserving the sums in every dimension.
Usage
integerise(population)
Arguments
population |
a numeric vector of state occupation probabilities. Must sum to unity (to within double precision epsilon) |
Value
an integer vector of frequencies that sums to pop.
Examples
prob2IntFreq(c(0.1,0.2,0.3,0.4), 11)
[Package humanleague version 2.3.1 Index]