refdb_plot_tax_tree {refdb} | R Documentation |
Reference database taxonomy tree
Description
Represent the hierarchical structure of the taxonomic information of a reference database as a tree.
Usage
refdb_plot_tax_tree(
x,
leaf_col = NULL,
color_col = NULL,
freq_labels = 0,
expand_plot = 0.5
)
Arguments
x |
a reference database. |
leaf_col |
a column name referring to the taxonomic level
for the leaves of the tree. If not provided ( |
color_col |
a column name referring to the taxonomic level
for the color of the leaves (must be higher or equal to the level
of |
freq_labels |
a numeric value to adjust the number of printed labels (minimum frequency). Default is zero which means all non-NA labels are printed. |
expand_plot |
a value to expand the limits of the plot. Useful if the labels are too long. |
Details
The underlying graph is computed using the non-exported function
igraph_from_taxo
.
Value
A ggplot2 (ggraph) object. This means the plot can be further customized using ggplot2 compatible functions.
Examples
lib <- read.csv(system.file("extdata", "baetidae_bold.csv", package = "refdb"))
lib <- refdb_set_fields_BOLD(lib)
refdb_plot_tax_tree(lib)