Learn R Programming

cheddar (version 0.1-636)

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)

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.

Value

A data.frame.

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
# NOT RUN {
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