Description Usage Arguments Value Examples
Estimation converts production estimates to biomass estimates
1 2 3 4 5 6 7 8 9 10 11 | estimate_biomass(production_estimates, pb_ratio)
is.biomass_estimates(x)
## S3 method for class 'biomass_estimates'
print(x, ...)
## S3 method for class 'biomass_estimates'
plot(x, nodes = NULL, settings = list(), ...)
extract_nodes(x, nodes = NULL, FUN = summary, ...)
|
production_estimates |
a production_estimates object calculated with production_estimates |
pb_ratio |
a production:biomass ratio object created with pb_ratio |
x |
a biomass_estimates object |
... |
further arguments passed to or from other methods |
nodes |
integer, character, integer vector, or character vector of nodes to plot (indexed by name or food_web row) |
settings |
plot settings passed directly to plot |
FUN |
function used to summarise information extracted from a biomass_estimates object |
An object of class biomass_estimates
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | library(trophic)
library(future)
plan(multiprocess)
# Construct the component objects
test_fw <- build_food_web(interaction_matrix = food_web)
test_efficiency_matrix <- build_efficiency_matrix(efficiency_mean = efficiency_mean,
efficiency_sd = 0.01)
test_dominance <- build_dominance_matrix(dominance = dominance_matrix)
test_primary_producers <- build_primary_producers(production_mean = c(1, 2),
production_sd = c(0.5, 0.5))
# Construct the trophic_dynamics object
test_trophic_dynamics <- build_trophic_dynamics(food_web = test_fw,
efficiency_matrix = test_efficiency_matrix,
dominance_matrix = test_dominance)
# Estimate production values from constructed trophic_dynamics object
production_estimates <- estimate_production(test_trophic_dynamics,
test_primary_producers)
# Create a pb_ratio object
test_pb_ratio <- build_pb_ratio(range = c(0.25, 5.75),
probs = c(5, 20, 10, 3, 1, 1, 1))
# Convert production to biomass estimates
biomass_estimates <- estimate_biomass(production_estimates, test_pb_ratio)
# Test if object is of the type 'biomass_estimates'
## Not run:
is.biomass_estimates(x)
## End(Not run)
# Print information about the 'biomass_estimates' object
## Not run:
print(x)
## End(Not run)
# Plot a 'biomass_estimates' object
## Not run:
plot(x)
## End(Not run)
# Extract information on one or several nodes from a 'biomass_estimates' object
## Not run:
extract_nodes(x, nodes = c(5:7), FUN = mean)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.