food_web: Run a food web.

Description Usage Arguments Value Examples

View source: R/food_web.R

Description

Run a food web.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
food_web(
  tmax,
  b,
  s,
  w,
  tstep = 1,
  pool_starts = NULL,
  ep_obj = NULL,
  other_pars = list(),
  midges_not_to = NULL
)

Arguments

tmax

Duration over which to run the model.

b

Maximum value of the midge pulse.

s

Start time for midge pulse

w

Width of the midge pulse.

tstep

Step size in units of time. Defaults to 1.

pool_starts

Named list of initial values for each pool. Names can include "N0", "D0", "P0", "V0", "H0", "R0", and "M0" (for nitrogen, detritus, plant, detritivore, herbivore, predator, and midge pools, respectively). Any pools not included here will start at their equilibrium value, except for midges that start at zero by default.

ep_obj

Output from the equil_pools function that specifies equilibrium pool sizes when you change variable values from defaults. This is used when you pass something to other_pars that changes equilibrium pool size(s).

other_pars

A named list of other parameter values to use instead of defaults. Possible parameter names include all column names in par_estimates except the first three (see ?par_estimates for a description of column names).

midges_not_to

Character specifying whether midges should NOT go to detritus or NOT to predators. If "none", NULL, or NA, midges go to both. Takes as input the following: "none", NULL, NA, "X", "predator", "D", or "detritus". Defaults to NULL.

Value

A data frame with the following columns: time, pool, N.

Examples

1
2
3
# What happens to the food web bc of this midge pulse?
web_output <- food_web(tmax = 1000, b = 400, s = 10, w = 40)
web_output

lucasnell/myvatn_terrestrial_foodweb documentation built on Aug. 12, 2020, 6:16 p.m.