branch_list2table | R Documentation |
Turns a list of branches into a table with, or vice versa.
branch_list2table(
branch.lst,
ranks = c("superkingdom", "phylum", "class", "order", "family", "genus", "species")
)
branch.lst |
a list of branches. |
ranks |
texts specifying the ranks to keep and their ordering. |
branch.tbl |
a table of branches. |
Instead of having branches in a list, it is convenient in R to have data in tables. The
branch_list2table
converts a list of branches into a table, with one row for each branch
and a column for each rank. Since branches may contain different ranks, they must first be pruned
to have the exact same ranks in the exact same order. This is done by branch_prune
inside this function. The ranks specified in ranks
are the columns in the table returned here.
The function branch_table2list
converts back again, i.e. from a table to a list.
The branch_list2table
returns a tibble with one row for each branch and a column for
each rank. The cells contain the tax_id's or names in the branch.lst
.
The branch_table2list
returns a list where each element contains a named vector of tax_id or
texts, and the name of each element is its rank in the taxonomy.
Lars Snipen.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.