Learn R Programming

socialmixr (version 0.7.0)

sample_from_age_distribution: Sample ages from a distribution within [min, max] bands

Description

Sample ages from a distribution within [min, max] bands

Usage

sample_from_age_distribution(mins, maxs, distribution)

Value

integer vector of sampled ages

Arguments

mins

integer vector of lower bounds

maxs

integer vector of upper bounds

distribution

data.frame with age and proportion columns