| run_mutualism | R Documentation | 
Given a vector of time, initial values, and parameters, this function runs a phenomenological model of direct mutualism between two species as described by Holland (2012). This model features a saturating functional response for interspecific density dependence, which produces a stable equilibrium where both mutualist species can coexist above their respective population carrying capacities.
run_mutualism(
  time = 0:50,
  init = c(N1 = 20, N2 = 40),
  params = c(r1 = 0.5, r2 = 0.5, a12 = 0.8, a21 = 0.4, b1 = 10, b2 = 10, d1 = 0.02, d2 =
    0.01)
)
time | 
 Vector of time units over which to run the model, starting at 0.
  | 
init | 
 Named vector of initial population sizes. 
  | 
params | 
 Named vector of model parameters. 
  | 
A data frame of population sizes (N1, N2) simulated through time,
produced by solving mutualism() with deSolve::ode() given time, init,
and params. This data frame has additional attributes recording the model
run (model), input parameter values (params) and population carrying
capacities calculated from the parameter values (K).
See the following for further context and details regarding this model: Holland, N.J. (2012). Population dynamics of mutualism. Nature Education Knowledge, 3, 2.
plot_mutualism_time(), plot_mutualism_portrait()
# Define full time series and run model with default parameter values
run_mutualism(time = 0:10)
# Define length of simulation and run model with default parameter values
run_mutualism(time = 10)
# Run model with custom input values
tmax <- 10
start <- c(N1 = 100, N2 = 50)
pars <- c(r1 = 1, r2 = 1, a12 = 1.2, a21 = 0.8, b1 = 20, b2 = 20, d1 = 0.04, d2 = 0.02)
run_mutualism(time = tmax, init = start, params = pars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.