Plot functional responses

plot_funcresp(pars, maxx, madj = FALSE)

Arguments

pars

Parameter list from spec_rescomp()

maxx

Numeric vector of length 1. Resource value to calculate per-capita growth rates up to (xlim).

madj

Logical vector of length 1. Whether to standardize per capita growth rates by mortality.

Value

ggplot object

Examples


pars <- spec_rescomp()
#> Model properties 
#>  * 1 consumer(s) and 1 resource(s)
#>  * Consumers have type 1 functional responses
#>  * Resource supply is continuous (e.g. chemostat)
#>  * Mortality is continuous
#> 
#> Simulation properties 
#>  * Simulation time: 1000 time steps
#>  * Init state: consumer(s) = [10], resource(s) = [1]
plot_funcresp(pars)


pars <- spec_rescomp(
    spnum = 2,
    resnum = 2,
    funcresp = "type2",
    mumatrix = list(matrix(c(0.7,0.3,
                             0.4,0.5),
                           nrow = 2,
                           ncol = 2,
                           byrow = TRUE))
)
#> Model properties 
#>  * 2 consumer(s) and 2 resource(s)
#>  * Consumers have type 2 functional responses
#>  * Resources are substitutable
#>  * Resource supply is continuous (e.g. chemostat)
#>  * Mortality is continuous
#> 
#> Simulation properties 
#>  * Simulation time: 1000 time steps
#>  * Init state: consumer(s) = [10, 10], resource(s) = [1, 1]
plot_funcresp(pars)

plot_funcresp(pars, madj = TRUE)