randomA | R Documentation |
Generates a random interaction matrix for Generalized Lotka-Volterra (GLV) model.
randomA(
n_species,
names_species = NULL,
diagonal = -0.5,
connectance = 0.2,
scale_off_diagonal = 0.1,
mutualism = 1,
commensalism = 1,
parasitism = 1,
amensalism = 1,
competition = 1,
interactions = NULL,
symmetric = FALSE,
list_A = NULL
)
n_species |
Integer: number of species |
names_species |
Character: names of species. If NULL,
|
diagonal |
|
connectance |
|
scale_off_diagonal |
|
mutualism |
|
commensalism |
|
parasitism |
|
amensalism |
|
competition |
|
interactions |
|
symmetric |
|
list_A |
|
randomA
returns a matrix A with dimensions (n_species x n_species)
dense_A <- randomA(
n_species = 10,
scale_off_diagonal = 1,
diagonal = -1.0,
connectance = 0.9
)
sparse_A <- randomA(
n_species = 10,
diagonal = -1.0,
connectance = 0.09
)
user_interactions <- rbeta(n = 10^2, .5, .5)
user_A <- randomA(n_species = 10, interactions = user_interactions)
competitive_A <- randomA(
n_species = 10,
mutualism = 0,
commensalism = 0,
parasitism = 0,
amensalism = 0,
competition = 1,
connectance = 1,
scale_off_diagonal = 1
)
parasitism_A <- randomA(
n_species = 10,
mutualism = 0,
commensalism = 0,
parasitism = 1,
amensalism = 0,
competition = 0,
connectance = 1,
scale_off_diagonal = 1,
symmetric = TRUE
)
list_A <- list(dense_A, sparse_A, competitive_A, parasitism_A)
groupA <- randomA(n_species = 40, list_A = list_A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.