strip_ott_ids: Strip OTT ids from tip labels

Description Usage Arguments Value Examples

View source: R/tol.R

Description

Strip OTT ids from tip labels

Usage

1
strip_ott_ids(tip_labels, remove_underscores = FALSE)

Arguments

tip_labels

a character vector containing tip labels (most likely the tip.label element from a tree returned by tol_induced_subtree

remove_underscores

logical (defaults to FALSE). If set to TRUE underscores in tip labels are converted to spaces

Value

A character vector containing the contents of tip_labels with any OTT ids removed.

Examples

1
2
3
4
5
6
7
8
## Not run: 
genera <- c("Perdix", "Setophaga", "Cinclus", "Struthio")
tr <- tol_induced_subtree(ott_ids=c(102710, 285198, 267845, 292466))
tr$tip.label %in% genera
tr$tip.label <- strip_ott_ids(tr$tip.label)
tr$tip.label %in% genera

## End(Not run)

rotl documentation built on Oct. 23, 2020, 8:22 p.m.