Learn R Programming

cheddar (version 0.1-639)

ThreeNodeChains: Three-node chains

Description

Enumerates every three-node chain in a food web.

Usage

ThreeNodeChains(community, exclude.loops=FALSE, node.properties=NULL, 
                chain.properties=NULL)

Value

A data.frame.

Arguments

community

an object of class Community.

exclude.loops

logical - should loops A -> B -> A be included?

node.properties

the names of the node properties to return. Should meet the criteria of the properties parameter of NPS.

chain.properties

the names of chain properties to return.

Author

Lawrence Hudson

Details

Enumerates every three-node chain in the food-web and returns a data.frame containing the columns bottom, intermediate and top and any requested node and trophic-link columns.

See Also

TLPS, TrophicChains

Examples

Run this code
data(TL84)

nrow(ThreeNodeChains(TL84))
nrow(ThreeNodeChains(TL84, exclude.loops=TRUE))

# bottom, intermediate and top
head(ThreeNodeChains(TL84))

# bottom, intermediate, top, bottom.M, intermediate.M and top.M
head(ThreeNodeChains(TL84, node.properties='M'))

# As above with the addition of bottom.N, intermediate.N and top.N
head(ThreeNodeChains(TL84, node.properties=c('M','N')))

Run the code above in your browser using DataLab