drop.tip.simmap: Drop tips or extract clade from tree with mapped discrete...

View source: R/drop.tip.simmap.R

drop.tip.simmapR Documentation

Drop tips or extract clade from tree with mapped discrete character

Description

This function drops one or multiple tips from an object of class "simmap".

Usage

## S3 method for class 'simmap'
drop.tip(phy, tip, ...)
## S3 method for class 'simmap'
keep.tip(phy, tip, ...)
extract.clade.simmap(tree, node)

Arguments

phy

an object of class "simmap".

tip

name or names of species to be dropped (or kept).

node

node number for the root node of the clade to be extracted.

...

optional arguments. Currently the logical argument untangle which if set to TRUE will call untangle before returning the "simmap" object to the user.

tree

for extract.clade.simmap, an object of class "simmap".

Details

Equivalent to drop.tip and keep.tip but for a tree with a mapped discrete character.

extract.clade.simmap is functionally equivalent to extract.clade but preserves discrete character mappings on the tree.

Following drop.tip in ape, the returned tree is always in "cladewise" order.

Value

A modified object of class "phylo" containing the elements maps and $mapped.edge with the time spent in each state along each edge of the tree.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

drop.tip, extract.clade, make.simmap, read.simmap, sim.history


phytools documentation built on Nov. 10, 2023, 1:08 a.m.