Skip to contents

Plot the dynamics of a discrete population growth model

Usage

plot_continuous_population_growth(sim_df)

Arguments

sim_df

data frame of continuous population growth

See also

run_logistic_model() and run_exponential_model() for functions that generate the sim_df objects plotted by this function

Examples

# Exponential population growth
exp_params <- c(r = 0.5)
sim_df_ex <- run_exponential_model(time = 10, init = c(N1 = 10),
params = exp_params)
plot_continuous_population_growth(sim_df_ex)

log_params <- c(r = 0.5, K = 100)
sim_df_log <- run_logistic_model(time = 10, init = c(N1 = 10),
params = log_params)
plot_continuous_population_growth(sim_df_log)