popsample.pyramid {IBMPopSim} | R Documentation |
Sample a population from an age pyramid (at a given time).
Description
Sample a population from an age pyramid (at a given time).
Usage
## S3 method for class 'pyramid'
popsample(age_pyramid, size, age_max = 120, time = 0)
Arguments
age_pyramid |
Object of |
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 |
Value
Object of population
class representing a data frame of size size
containing a population of individuals.
Examples
pop_sample_1e4 <- popsample(pyramid(EW_pop_14$age_pyramid), size = 1e4)
[Package IBMPopSim version 1.0.0 Index]