View source: R/community_trophic_links.R
| ResourcesByNode | R Documentation |
Functions that return the resources and consumers of nodes.
ResourcesByNode(community)
ConsumersByNode(community)
ResourcesAndConsumersByNode(community)
ResourcesOfNodes(community, nodes)
ConsumersOfNodes(community, nodes)
TrophicLinksForNodes(community, nodes, node.properties=NULL,
link.properties=NULL)
community |
an object of class |
nodes |
either the names or integer indices of nodes. |
node.properties |
passed to |
link.properties |
passed to |
ResourcesByNode/ConsumersByNode/
ResourcesAndConsumersByNode all return a list of length
NumberOfNodes; list elements are names of nodes that are
resources/consumers/resources and/or consumers.
If nodes is of length one then ResourcesOfNodes and
ConsumersOfNodes return a vector of resources / consumers. If
nodes contains more than one value, then a list of vectors is returned.
TrophicLinksForNodes returns a data.frame containing the columns
‘resource’ and 'consumer' and a row for each trophic link in-to and out-of
nodes.
Either a vector, a list or a data.frame
Lawrence Hudson
TLPS, PredationMatrix,
NumberOfNodes
data(TL84)
# A list containing a vector of resources for each node.
ResourcesByNode(TL84)
# A vector of resources of 'Umbra limi'
ResourcesOfNodes(TL84, 'Umbra limi')
# A vector of resources of 'Umbra limi'
ResourcesOfNodes(TL84, 56)
# A list containing vectors of resources for nodes 50:56
ResourcesOfNodes(TL84, 50:56)
# A data.frame containin columns resource and consumer
TrophicLinksForNodes(TL84, 'Umbra limi')
# A data.frame containin columns resource, consumer, resource.M and consumer.M
TrophicLinksForNodes(TL84, 'Umbra limi', node.properties='M')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.