collapse | R Documentation |
Function to collapse and merge data across taxa
collapse(x, map, method = c("retain", "merge"))
x |
(required) a 'nex' object |
map |
a list specifying equivalent taxa to map from and to (e.g., ‘c(’spA' = 'spB')' will map all characters from spA to spB) |
method |
whether to convert characters scored in both taxa to polymorphisms ('merge') or retain original characters (default) |
an object of class nex
for use in further phenotools
functions
Chad Eliason celiason@fieldmuseum.org
Clarke, J. A., Zhou, Z., Zhang, F. (2006). Insight into the evolution of avian flight from a new clade of Early Cretaceous ornithurines from China and the morphology of Yixianornis grabaui. Journal of Anatomy, 208, 287-308.
## Not run:
# load data matrix of Clarke et al. (2006)
x <- read.nex(system.file("extdata", "clarke_2006.nex", package = "phenotools"))
# merge 2 duck species into a new taxon (family Anatidae):
y <- collapse(x, map = c('Anas_platyrhynchos' = 'Anatidae', 'Chauna_torquata'
= 'Anatidae'), method = 'merge')
x$tax
y$tax
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.