convertLabels: Rboretum Clade Label Converter

View source: R/convertLabels.R

convertLabelsR Documentation

Rboretum Clade Label Converter

Description

This function takes a phylo, multiPhylo, a lits, or a character vector and changes names based on a supplied dataframe

Usage

convertLabels(to_convert, name_df, from, to)

Arguments

to_convert

R object containing taxon labels to be replaced. Options include:

  • A phylo object; or,

  • A multiPhylo object; or,

  • A character vector of taxon IDs [e.g. c('Species1','Species2',etc.)]; or,

  • A list of character vectors containing taxon IDs [e.g. list(A=c('Species1','Species2'),B=c('Species_3','Species_4'))]; or,

  • A character vector of semicolon-separated clades [e.g. c('Species_1;Species_2','Species_3;Species_4')]

name_df

Dataframe with name equivalencies

from

Column name with all current taxon tip IDs (if missing, first column of name_df used as default)

to

Column name with desired IDs (if missing, second column of name_df used as default)

Value

Matching object with new names in place


BobLiterman/Rboretum documentation built on July 6, 2023, 7:46 p.m.