View source: R/structured_population_growth.R
plot_structured_population_agedist | R Documentation |
Generate a trajectory of the proportion of individuals in each (st)age over time
plot_structured_population_agedist(pop_growth_matrix, leslie_mat = NULL)
pop_growth_matrix |
population growth matrix, as generated by
|
leslie_mat |
Leslie matrix used to generate the population trajectory (optional). If the Leslie matrix is provided, the trajectory also includes lines indicating the stable age distribution |
ggplot of age distribution over time
run_structured_population_simulation()
to simulate the growth of a
structured population given a Leslie matrix,
plot_structured_population_size()
and
plot_structured_population_lambda()
for plotting different aspects of the
population trajectory, and plot_leslie_diagram()
for plotting an
transition diagram based on the specified Leslie matrix
leslie_matrix <- matrix(c(0, 8,1, 1, 0.4,0,0,0,0,0.8,0,0,0,0,0.1,0),
ncol = 4, byrow = TRUE)
structured_pop_init <- c(10,10,10,10)
structured_pop_time <- 50
structured_pop_out <- run_structured_population_simulation(leslie_mat = leslie_matrix, init =
structured_pop_init, time = structured_pop_time)
plot_structured_population_agedist(structured_pop_out, leslie_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.