Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

strip_ott_ids

Strip OTT ids from tip labels


Description

Strip OTT ids from tip labels

Usage

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

## 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

Interface to the 'Open Tree of Life' API

v3.0.11
BSD_2_clause + file LICENSE
Authors
Francois Michonneau [aut, cre] (<https://orcid.org/0000-0002-9092-966X>), Joseph Brown [aut] (<https://orcid.org/0000-0002-3835-8062>), David Winter [aut] (<https://orcid.org/0000-0002-6165-0029>), Scott Chamberlain [rev] (<https://orcid.org/0000-0003-1444-9135>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.