ThreeNodeChains: Three-node chains

View source: R/chains.R

ThreeNodeChainsR Documentation

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.

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.

Value

A data.frame.

Author(s)

Lawrence Hudson

See Also

TLPS, TrophicChains

Examples

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

cheddar documentation built on Sept. 1, 2022, 5:06 p.m.