Description Usage Arguments Value Note Examples
A 'dominance matrix' object stores the relative dominance of a species over other species sharing the same resource. It is a sub-component of a trophic_dynamics object
1 2 3 4 5 6 | build_dominance_matrix(dominance = NULL, nsp = NULL, ...)
is.dominance_matrix(x)
## S3 method for class 'dominance_matrix'
print(x, ...)
|
dominance |
a matrix (or NULL object) identifying the relative dominance of a species over other species feeding off the same resource |
nsp |
the number of species; required if dominance is NULL (in which case a flat dominance matrix is returned) |
... |
further arguments passed to or from other methods |
x |
an object to print or test as a dominance_matrix object |
An object of class dominance_matrix
Passing dominance = NULL will create a flat dominance matrix with all species assigned equal dominance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(trophic)
# Construct the dominance_matrix object
test_dominance <- build_dominance_matrix(dominance = dominance_matrix)
# Test if object is of the type 'dominance_matrix'
## Not run:
is.dominance_matrix(x)
## End(Not run)
# Print information about the 'dominance_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.