View source: R/structured_population_growth.R
run_structured_population_simulation | R Documentation |
Simulate growth of a (st)age-structured population
run_structured_population_simulation(
leslie_mat = 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),
init = c(10, 10, 10, 10),
time = 100
)
leslie_mat |
A leslie matrix |
init |
A vector of initial abundances in each (st)age |
time |
Length of time over which to run the simulation |
Returns a matrix with nrow = nrow(leslie_mat) and ncol = time
plot_structured_population_size()
,
plot_structured_population_agedist()
, 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 <- 5
run_structured_population_simulation(leslie_mat = leslie_matrix, init =
structured_pop_init, time = structured_pop_time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.