branch_prune: Filtering ranks in branches

View source: R/ncbitree.R

branch_pruneR Documentation

Filtering ranks in branches

Description

Keeps only specified ranks in specified ordering in all branches.

Usage

branch_prune(
  branch.lst,
  ranks = c("superkingdom", "phylum", "class", "order", "family", "genus", "species")
)

Arguments

branch.lst

a list of branches.

ranks

texts specifying the ranks to keep and their ordering.

Details

Branches in the taxonomy tree may have many different ranks or levels. This function is used to prune them all to have the same set of ranks. Ranks may be missing in some branches.This function will then fill in NA in these cells, ensuring all branches have the exact same ranks in the exact same ordering. This is convenient for turning the list into a table, using as_tibble.

Value

A new branch-list with pruned branches all containing the exact same ranks.

Author(s)

Lars Snipen.


larssnip/microclass documentation built on Nov. 1, 2023, 2:39 p.m.