Description Usage Arguments Details Value Examples
View source: R/PotentialLinks.R
Potential links are calculated based on a community given by AssignTrophicLevel
it may return a dataframe with the positions of every potential link ("positions)
or a vector with the number of potential links for each interaction type ("number")
1 | PotentialLinks(tl.results, within.type.prob, return.type = "positions")
|
tl.results |
a dataframe as given by |
within.type.prob |
a dataframe with columns "interaction.type" (amensalism, antagonism, competition, commensalism, mutualism), "tl.category" (same, adjacent, other), "prob" (probability of occurrence for each combination of interaction type and trophic level categorization) |
return.type |
specify the return type of the function. Either a dataframe with the positions of every potential link ("positions) |
IMPORTANT NOTE: this is not the same as the potential number of realized links at one time, the potential connectance. For two sp A and B and an amensalist relationship, both A->B and B->A are potentially feasible, but also mutually exclusive: the realization of one of them prevents the another from being realized.
see return.type
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | tl.results <- AssignTrophicLevel(num.sp = 20,
trophic.levels = 4,
abundance.distribution = "gambin",
scaling.law.tl = TRUE,
scaling.exponent.tl = 0.75,
basal.abundance = 1000,
gambin.alpha = 2,
gambin.maxoctave = 8)
within.type.prob <- data.frame(interaction.type = c(rep("competition",3),rep("amensalism",3),rep("antagonism",3),rep("mutualism",3),rep("commensalism",3)),
tl.category = rep(c("same","adjacent","other"),5),
prob = rep(0.33,15))
within.type.prob$prob[within.type.prob$interaction.type == "antagonism" & within.type.prob$tl.category == "same"] <- 0
within.type.prob$prob[within.type.prob$interaction.type == "antagonism" & within.type.prob$tl.category == "adjacent"] <- 0.75
within.type.prob$prob[within.type.prob$interaction.type == "antagonism" & within.type.prob$tl.category == "other"] <- 0.25
potential.links <- PotentialLinks(tl.results,within.type.prob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.