Remove the names of parent taxa in the beginning of their children's names in a taxonomy or taxmap object. This is useful for removing genus names in species binomials.

obj$remove_redundant_names()
remove_redundant_names(obj)

Arguments

obj

A taxonomy or taxmap object

Value

A taxonomy or taxmap object

Examples

# Remove genus named from species taxa species_data <- c("Carnivora;Felidae;Panthera;Panthera leo", "Carnivora;Felidae;Panthera;Panthera tigris", "Carnivora;Ursidae;Ursus;Ursus americanus") obj <- parse_tax_data(species_data, class_sep = ";") remove_redundant_names(obj)
#> <Taxmap> #> 8 taxa: b. Carnivora, c. Felidae ... h. tigris, i. americanus #> 8 edges: NA->b, b->c, b->d, c->e, d->f, e->g, e->h, f->i #> 1 data sets: #> tax_data: a named vector of 'character' with 3 items #> g. Carnivora;Felida[truncated] ... i. Carnivora;Ursida[truncated] #> 0 functions: