popsample {IBMPopSim} | R Documentation |
Sample a population from an age pyramid (at a given time).
popsample(age_pyramid, size, age_max = 120, time = 0)
age_pyramid |
A data frame with columns |
size |
A non-negative integer giving the number of individuals in population. |
age_max |
(Optional) A non-negative numeric which replace (if exists) the |
time |
(Optional) The age pyramid is computed at instant |
A data frame of size size
containing a population of individuals.
pop_sample_1e4 <- popsample(EW_pop_14$age_pyramid, size = 1e4)