View source: R/community_trophic_links.R
ShortestPaths | R Documentation |
Functions that compute the shortest trophic paths between nodes.
ShortestPaths(community, weight.by=NULL)
CharacteristicPathLength(community)
community |
an object of class |
weight.by |
the name of a property by which to weight paths. |
ShortestPaths uses Dijkstra's algorithm to compute the number
of trophic links between each pair of nodes in the food web.
CharacteristicPathLength
returns the mean of path lengths.
A square matrix
with NumberOfNodes
rows and columns or
a single number.
Lawrence Hudson
Williams, R.J. and Berlow, E.L. and Dunne, J.A. and Barabási, A.L. and Martinez, N.D. (2002) Two degrees of separation in complex food webs. Proceedings of the National Academy of Sciences of the United States of America 99, 20, 12913–12916
PredationMatrix
, NPS
data(Benguela)
# Compare weighted and unweighted
ShortestPaths(Benguela)
ShortestPaths(Benguela, weight.by='diet.fraction')
CharacteristicPathLength(Benguela)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.