View source: R/community_collection.R
CollectionCPS | R Documentation |
Returns a data.frame
of first-class and computed properties
of communities in a CommunityCollection
.
CollectionCPS(collection, properties=NULL)
collection |
an object of class |
properties |
the names of the properties to be returned. |
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
.
A data.frame
.
Lawrence Hudson
CPS
, CommunityPropertyNames
,
CommunityCollection
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.