View source: R/csm_create_parameter.R
| csm_create_parameter | R Documentation |
Create a cropping systems model (CSM) parameter variable
csm_create_parameter(
name,
definition,
units,
lower_bound = NULL,
upper_bound = NULL
)
name |
a length-one character vector name of a variable |
definition |
a length-one character vector that defines the CSM variable |
units |
a length-one character vector of the units of the CSM variable |
lower_bound |
a numerical value providing the lower bound for the parameter |
upper_bound |
a numerical value providing the upper bound for the parameter |
a list of csm_parameter objects
# Define Lotka-Voterra parameters with single call
lv_parameters <- csm_create_parameter(
name = c("alpha", "beta", "gamma", "delta"),
definition = c("maximum prey per capita growth rate",
"effect of predator population on prey death rate",
"predator per capita death rate",
"effect of prey population on predator growth rate"),
units = c("rabbits per rabbit", "per fox",
"foxes per fox", "foxes per rabbit"))
# Define Lotka-Volterra parameters with multiple calls
lv_parameters <-
c(
csm_create_parameter(
name = "alpha",
definition = "maximum prey per capita growth rate",
units = "rabbits per rabbit"),
csm_create_parameter(
name = "beta",
definition = "effect of predator population on prey death rate",
units = "per fox"),
csm_create_parameter(
name = "gamma",
definition = "predator per capita death rate",
units = "foxes per fox"),
csm_create_parameter(
name = "delta",
definition = "effect of prey population on predator growth rate",
units = "foxes per rabbit"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.