keep_as_tip: Keep tips and convert nodes to tips

keep_as_tipR Documentation

Keep tips and convert nodes to tips

Description

Nominate which tips and nodes are to be kept as tips. Others tips are removed. If any element of label is both a node label and tip label, it will be treated as referring to the tip, not the node.

Usage

keep_as_tip(phy, label)

Arguments

phy

A phylo object. The tree to manipulate.

label

A character vector containing tip and node labels.

Value

A phylo object containing the modified tree.

Examples


library(ape)

tree <- abridge_labels(get_glottolog_trees("Tangkic"))
plot_glotto(tree)

tree2 <- keep_as_tip(tree, c("lard1243", "kaya1319", "nyan1300", "gang1267"))
plot_glotto(tree2)

erichround/glottoTrees documentation built on April 17, 2025, 10:47 a.m.