ResourcesByNode: Resources and consumers of nodes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/community_trophic_links.R

Description

Functions that return the resources and consumers of nodes.

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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')

quicklizard99/cheddar documentation built on June 10, 2018, 12:15 p.m.