Community | R Documentation |
Creates and returns a new object that represents an ecological community.
Community(nodes, properties, trophic.links = NULL)
## S3 method for class 'Community'
print(x, ...)
## S3 method for class 'Community'
plot(x, ...)
## S3 method for class 'Community'
summary(object, ...)
nodes |
a |
properties |
a list of properties the community as a whole. All elements must be named and must be of length one. |
trophic.links |
|
x |
an object of class |
object |
an object of class |
... |
further arguments passed to other methods. |
The most convenient way to import community data in to Cheddar is
to put data in to CSV files and use the LoadCommunity
function.
Many of Cheddar's plot and analysis functions make use of the ‘category’ node property by default, following previously-used metabolic groupings (Yodzis and Innes, 1992). The column nodes$category is optional but, if given, it should contain one of ‘producer’, ‘invertebrate’, ‘vert.ecto’, ‘vert.endo’ or should be an empty string.
Community
supports standard generic functions plot
,
print
, and summary
.
A new object of class Community
.
Lawrence Hudson
Yodzis, P. and Innes, S. (1992) Body size and resource-consumer dynamics. The American Naturalist 139, 1151–1175.
CPS
,
NPS
,
TLPS
,
LoadCommunity
SaveCommunity
data(TL84)
TL84
# Node properties
NPS(TL84)
# Trophic-link properties
TLPS(TL84)
# Eyeball the data
plot(TL84)
# A different plot function
PlotWebByLevel(TL84)
# Construct a new community.
# TL84.new is an exact copy of TL84
TL84.new <- Community(properties=CPS(TL84),
nodes=NPS(TL84),
trophic.links=TLPS(TL84))
identical(TL84, TL84.new)
# A copy of TL84 without trophic links
TL84.no.links <- Community(properties=CPS(TL84),
nodes=NPS(TL84))
NumberOfTrophicLinks(TL84.no.links)
# A community with 10 species and no properties
test <- Community(nodes=data.frame(node=paste('Species', 1:10)),
properties=list(title='Test community'))
test
NPS(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.