Learn R Programming

cheddar (version 0.1-626)

CPS: Community properties

Description

Returns a list of first-class and computed community properties.

Usage

CPS(community, properties = NULL)

Arguments

community
an object of class Community.
properties
the names of the properties to be returned.

Value

  • A list.

Details

This function is named CPS for Community PropertieS. If properties is NULL, all properties are returned. If properties is not NULL then a list containing that subset of community properties is returned. Elements will be NA for values of property not in CommunityPropertyNames.

See Also

Community, CP, CommunityPropertyNames

Examples

Run this code
data(TL84)

# All properties
CPS(TL84)

# Just lat and long
CPS(TL84, c('lat', 'long'))

# lat and long and number of nodes
CPS(TL84, c('lat', 'long', 'NumberOfNodes'))

# lat and long and number of nodes, renamed
CPS(TL84, c('lat', 'long', S='NumberOfNodes'))

# 'not a property' is NA
CPS(TL84, c('lat', 'long', S='NumberOfNodes', 'not a property'))

Run the code above in your browser using DataLab