# NOT RUN {
# }
# NOT RUN {
#Simply generate a virtual population of 100 individuals,
#using the direct-resampling method
set.seed(42)
httkpop_generate(method='direct resampling', nsamp=100)
#Generate a population using the virtual-individuals method,
#including 80 females and 20 males,
#including only ages 20-65,
#including only Mexican American and
#Non-Hispanic Black individuals,
#including only non-obese individuals
httkpop_generate(method = 'virtual individuals',
gendernum=list(Female=80,
Male=20),
agelim_years=c(20,65),
reths=c('Mexican American',
'Non-Hispanic Black'),
weight_category=c('Underweight',
'Normal',
'Overweight'))
# }
Run the code above in your browser using DataLab