Restricts the interaction types of a matrix to be competitive (1), mutualist (2), predator-prey (3), or cascade model (4).

species_interactions(mat, type = 0)

Arguments

mat

The matrix to be restricted

type

The type of restriction being made. This includes random (0), competitor (1), mutualist (2), predator-prey (3), or cascade model food web (4)

Value

The matrix is returned with appropriately restricted interaction types

Examples

eg_mat <- matrix(data = rnorm(n = 16), nrow = 4); new_mat <- species_interactions(mat = eg_mat, type = 3);