View source: R/single_population_discrete.R
plot_discrete_population_cobweb | R Documentation |
Plot a cobweb digram of a discrete population growth model
plot_discrete_population_cobweb(sim_df, params_vec, model_type)
sim_df |
data frame of discrete population growth |
params_vec |
a vector with entries c(rd = XX and K = YY) describing the parameters used to generate sim_df |
model_type |
a string: either "discrete_logistic", "beverton_holt", or "ricker" |
run_discrete_logistic_model()
, run_beverton_holt_model()
,
run_ricker_model()
for functions that generate the sim_df
objects
plotted by this function
dl_params <- c(rd = 1.1, K = 1000)
sim_df_dl <- run_discrete_logistic_model(N0 = 1, params = dl_params, time = 100)
plot_discrete_population_cobweb(sim_df_dl, params_vec = dl_params, model_type = "discrete_logistic")
bh_params <- c(rd = 1.1, K = 1000)
sim_df_bh <- run_beverton_holt_model(N0 = 1, params = bh_params, time = 100)
plot_discrete_population_cobweb(sim_df_bh, params_vec = bh_params, model_type = "beverton_holt")
ri_params <- c(rd = 1.1, K = 1000)
sim_df_ri <- run_ricker_model(N0 = 1, params = ri_params, time = 100)
plot_discrete_population_cobweb(sim_df_ri, params_vec = ri_params, model_type = "ricker")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.