Description Usage Arguments Details Value Methods Author(s) See Also Examples
Function to combine species abundance data with phylogenetic information for a set of communities.
1 2 3 4 5 6 7 8 9 10 11 | ## S4 method for signature 'phylo4,numeric'
phylo4com(x, n, communityID, species,
missing=c("warn", "OK", "fail"))
## S4 method for signature 'phylo4,matrix'
phylo4com(x, n, missing=c("warn", "OK", "fail"))
## S4 method for signature 'phylo4,data.frame'
phylo4com(x, n, missing=c("warn", "OK", "fail"))
## S4 method for signature 'phylo4d,missing'
phylo4com(x, n, cols)
## S4 method for signature 'phylo,ANY'
phylo4com(x, n, ..., check.node.labels = "keep")
|
x |
a phylogeny of class |
n |
Vector of abundances of each species in each community, or abundance matrix with species as rows and sites as columns. |
communityID |
Vector of community labels corresponding to
the abundance values (only used if |
species |
Vector of species labels corresponding to
the abundance values (only used if |
cols |
Names of pre-existing phylo4d data columns to use as
abundance data (only if |
check.node.labels |
If x is a phylo object, what to do with node labels |
missing |
(not currently implemented) What to do if some requested node IDs or names are not in the tree: warn, do nothing, or stop with an error. |
... |
additional arguments to be passed to other methods |
TODO
If the species vector contains values that do not appear in the tree,
they are ignored with a warning. If a community has fewer than one
species matched in the tree, an error will result. In both cases, the
behavior is simply a result of how the phylobase subset
method
works; see the help page for this method for more information.
A phylo4com
objects.
creates community phylogenies
from a master phylo4
tree, a vector of abundances, a vector
of corresponding community names/labels, and a vector of
corresponding taxa names/labels
creates community phylogenies
from a master phylo4
tree and a site-by-species abundance
matrix.
creates community phylogenies
from a master phylo4
tree and a site-by-species abundance
data.frame
creates a phylobase tree from an
object of class phylo
Jim Regetz (regetz@nceas.ucsb.edu)
subset
in the phylobase package
1 2 3 4 5 | # Example of phylo4com construction
data(weeds.data)
data(weeds.tree)
phylo4com(weeds.tree, weeds.data$cover, weeds.data$plot,
weeds.data$taxa)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.