ResourcesByNode {cheddar}R Documentation

Resources and consumers of nodes

Description

Functions that return the resources and consumers of nodes.

Usage

ResourcesByNode(community) 
ConsumersByNode(community) 
ResourcesAndConsumersByNode(community)

ResourcesOfNodes(community, nodes) 
ConsumersOfNodes(community, nodes) 

TrophicLinksForNodes(community, nodes, node.properties=NULL, 
                     link.properties=NULL) 

Arguments

community

an object of class Community.

nodes

either the names or integer indices of nodes.

node.properties

passed to TLPS.

link.properties

passed to TLPS.

Details

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.

Value

Either a vector, a list or a data.frame

Author(s)

Lawrence Hudson

See Also

TLPS, PredationMatrix, NumberOfNodes

Examples

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')

[Package cheddar version 0.1-638 Index]