ShortestPaths

0th

Percentile

Path lengths

Functions that compute the shortest trophic paths between nodes.

Keywords
utilities
Usage
ShortestPaths(community, weight.by=NULL)
CharacteristicPathLength(community)
Arguments
community

an object of class Community.

weight.by

the name of a property by which to weight paths.

Details

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.

Value

A square matrix with NumberOfNodes rows and columns or a single number.

References

Williams, R.J. and Berlow, E.L. and Dunne, J.A. and Barab\'asi, 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

See Also

PredationMatrix, NPS

Aliases
  • ShortestPaths
  • CharacteristicPathLength
Examples
# NOT RUN {
data(Benguela)

# Compare weighted and unweighted
ShortestPaths(Benguela)
ShortestPaths(Benguela, weight.by='diet.fraction')

CharacteristicPathLength(Benguela)
# }
Documentation reproduced from package cheddar, version 0.1-636, License: BSD_2_clause + file LICENSE

Community examples

Looks like there are no examples yet.