Note that generation 0 is final, end generation. 1 is second last generation etc.

set_generation(individual, generation)

Arguments

individual

Individual

generation

Generation to assign

Examples

sim <- sample_geneology(100, 10)
indv <- get_individual(sim$population, 1)
get_generation(indv)
#> [1] 0
set_generation(indv, 100)
get_generation(indv)
#> [1] 100