pop_generator {epiworldRShiny} | R Documentation |
Population generator
Description
This function generates a population matrix with specified characteristics.
Usage
pop_generator(
n,
prop_hispanic = 0.5,
prop_female = 0.5,
prop_19_59_60plus = c(0.3, 0.6)
)
Arguments
n |
The number of individuals in the population. |
prop_hispanic |
The proportion of individuals who are Hispanic. Default is 0.5. |
prop_female |
The proportion of individuals who are female. Default is 0.5. |
prop_19_59_60plus |
A vector of length 3 representing the proportions of individuals in the age groups 0-19, 20-59, and 60+. Default is c(0.5, 0.3, 0.2). |
Value
A matrix representing the generated population, with columns for age groups (0-19, 20-59, 60+), NotHispanic, and Female.
See Also
Other Server side functions:
find_scale()
,
plot_epi()
,
plot_reproductive_epi()
Examples
pop_generator(n = 1000, prop_hispanic = .5, prop_female = .5,
prop_19_59_60plus = c(.3, .6))
[Package epiworldRShiny version 0.1-0 Index]