View source: R/utilities-phylo.R
treedata | R Documentation |
matching species found in a comparative dataset
treedata(phy, data, sort=FALSE, warnings=TRUE)
phy |
a phylogenetic tree of class 'phylo' |
data |
a named vector or matrix of continuous trait values, for species in |
sort |
whether to sort the |
warnings |
whether to report warnings of mismatched taxa between |
This function is a general tool for checking for concordance between a data object and a phylogenetic
tree. For the data
, names can be specified as the names of objects in the vector or rownames of the data
array.
The function returns a list of two elements (phy
and data
) that are manipulated to include only those species
found in both the tree and data supplied by the user.
LJ Harmon
geo <- get(data(geospiza))
treedata(geo$phy, geo$dat, sort=TRUE, warnings=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.