CollectionCPS {cheddar} | R Documentation

## Collection community properties

### Description

Returns a `data.frame` of first-class and computed properties of communities in a `CommunityCollection`.

### Usage

    CollectionCPS(collection, properties=NULL)

### Arguments

`collection` | an object of class `CommunityCollection`.
`properties` | the names of the properties to be returned.

### Details

This function is named CollectionCPS for Collection Community PropertieS.

The properties argument is a vector whose entries are either names of first-class properties or names of functions which take as single required argument a `CommunityCollection` and return a single value. If `properties` is `NULL`, all first-class properties are included in the returned `data.frame`.

### Value

A `data.frame`.

### Author(s)

Lawrence Hudson

### See Also

`CPS`, `CommunityPropertyNames`, `CommunityCollection`

### Examples

    data(pHWebs)

    CollectionCPS(pHWebs)

    # pH and a computed property
    CollectionCPS(pHWebs, c('pH', 'NumberOfNodes'))

    # A shorter name for the 'NumberOfNodes' column
    CollectionCPS(pHWebs, c('pH', S='NumberOfNodes'))

    # A function that returns more than one value. Some pHWebs communities contain
    # nodes (detritus and the like) that do not have a category. These appear in
    # <unnamed>.
    CollectionCPS(pHWebs, 'SumBiomassByClass')

    # Prefix columns with 'B'
    CollectionCPS(pHWebs, c(B='SumBiomassByClass'))

    # Remove biomasses of NA
    CollectionCPS(pHWebs, list(B=list('SumBiomassByClass', na.rm=TRUE)))

[Package cheddar version 0.1-633 Index]