Description Usage Arguments Value Note Examples
An 'efficiency_matrix' object stores the efficiency of energy conversion between a given pair of species. It has two components: average values and standard deviations and is a sub-component of a trophic_dynamics object
1 2 3 4 5 6 7 | build_efficiency_matrix(efficiency_mean, efficiency_sd = NULL, nsp = NULL,
...)
is.efficiency_matrix(x)
## S3 method for class 'efficiency_matrix'
print(x, ...)
|
efficiency_mean |
a scalar, vector, or matrix denoting average trophic efficiencies between species pairs |
efficiency_sd |
a scalar, vector, or matrix denoting the standard deviation of trophic efficiencies |
nsp |
a scalar denoting the number of species in the associated food_web object; only required if efficiency is a scalar |
... |
further arguments passed to or from other methods |
x |
an object to print or test as an efficiency object |
An object of class efficiency
Scalar value efficiencies are assumed to be constant (on average) for all species. Vector efficiencies are are assumed to apply to prey (not predators) under an assumption that conversion efficiencies are a property of the food not the feeder. Matrix efficiencies are treated identically to food_web interaction matrices but note that efficiency_matrix objects are not checked for loops or cannibalism (so any values on the diagonal or upper triangular of the matrix are ignored).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | library(trophic)
# Load a pre-compiled food_web object
# Construct the efficiency object
test_efficiency_scalar <- build_efficiency_matrix(efficiency_mean = 0.1,
efficiency_sd = 0.05,
nsp = 10)
# Vector example
efficiency_vector <- data(example_efficiency_vector)
test_efficiency_vector <- build_efficiency_matrix(efficiency_mean = efficiency_mean[1, ],
efficiency_sd = 0.05)
# Matrix example 1: fixed standard deviation
test_efficiency_matrix <- build_efficiency_matrix(efficiency_mean = efficiency_mean,
efficiency_sd = 0.05)
# Matrix example 2: changing standard deviation
test_efficiency_matrix <- build_efficiency_matrix(efficiency_mean = efficiency_mean,
efficiency_sd = (0.5 * efficiency_mean))
# Test if object is of the type 'efficiency_matrix'
## Not run:
is.efficiency_matrix(x)
## End(Not run)
# Print information about the 'efficiency_matrix' object
## Not run:
print(x)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.