Set the starting population for a hammel_model with a hammel_population
object.
Details
While a hammel_population object can be built from scratch with
hammel_population(), this object will more commonly be created by
generate_uniform_population() or returned from run_simulation().
Examples
persons <- data.frame(
person_id = 1:2, sex = c("m", "f"), birth_time = c(-25, -23),
death_time = NA_real_, mother_id = NA_integer_, father_id = NA_integer_
)
population <- hammel_population(persons, end_time = 0)
model <- hammel_model() |>
set_population(population)
