keep_tips: Keep only certain tips from a phylotax object

Description Usage Arguments Value

Description

This is analogous to ape::keep.tip, but also takes care of the taxonomic annotations associated with nodes and tips. It also works for phylotax objects without an associated tree (if mrca=FALSE) and for "tip" labels which are not missing from the tree, but present in the taxonomic annotations.

Usage

1
keep_tips(phylotax, tips, mrca = (!is.null(phylotax$tree)), invert = FALSE)

Arguments

phylotax

(phylotax object)

tips

(character vector) Tip labels to keep

mrca

(logical) If TRUE, also keep all tips descended from the most recent common ancestor (according to the tree) of tips. If FALSE, just keep tips.

invert

(logical) If TRUE, then the named tips (and all descendants of their MRCA if mrca=TRUE) are removed, and all other tips are kept.

Value

A phylotax object with the tree and taxonomic assignments pruned to only include the specified tips.


brendanf/phylotax documentation built on March 3, 2021, 2:21 p.m.