NPS {cheddar}R Documentation

Node properties

Description

Returns a data.frame of first-class and computed node properties.

Usage

NPS(community, properties = NULL)

Arguments

community

an object of class Community.

properties

the names of node properties. These can be names of first-class properties (returned by NodePropertyNames) and names of functions that take a Community object as the only parameter and return either a vector of length NumberOfNodes or a matrix or data.frame with NumberOfNodes rows.

Details

This function is named NPS for Node Properties. It returns a data.frame containing the column ‘node’ and any requested properties. If properties is NULL, all first-class node properties are included in the returned data.frame.

properties should be either a vector or a list that contains either names of first class properties, names of functions that take only a community or lists in which the first element is the name of a function that takes a community and subsequent elements are named arguments to that function. Names of properties are column names in the returned data.frame.

Value

A data.frame with NumberOfNodes rows.

Author(s)

Lawrence Hudson

See Also

NP, NumberOfNodes

Examples

data(TL84) 
NPS(TL84) 

NPS(TL84, 'M') 

# Biomass is a function
NPS(TL84, 'Biomass') 

NPS(TL84, c(B='Biomass'))

# Several first-class and computed properties
NPS(TL84, c('M', 'N', B='Biomass', 'TrophicSpecies', 
            TL='PreyAveragedTrophicLevel'))

# Pass parameters to functions
NPS(TL84, list(TS1='TrophicSpecies', 
               TS2=list('TrophicSpecies', include.isolated=FALSE), 
               Iso='IsIsolatedNode'))

[Package cheddar version 0.1-638 Index]