popsample

0th

Percentile

Sample a population from an age pyramid (at a given time).

Sample a population from an age pyramid (at a given time).

Usage
popsample(age_pyramid, size, age_max = 120, time = 0)
Arguments
age_pyramid

A data frame with columns age, value and others optional characteristics.

size

A non-negative integer giving the number of individuals in population.

age_max

(Optional) A non-negative numeric which replace (if exists) the Inf in age_pyramid.

time

(Optional) The age pyramid is computed at instant time. Must be a numeric greater than or equal to 0.

Value

A data frame of size size containing a population of individuals.

Aliases
  • popsample
Examples
# NOT RUN {
pop_sample_1e4 <- popsample(EW_pop_14$age_pyramid, size = 1e4)

# }
Documentation reproduced from package IBMPopSim, version 0.3.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.