trim_void | R Documentation |
Trim void ranks in lineages
trim_void(lineage, same = TRUE, only_tail = FALSE)
lineage |
string. Vector of lineages. |
same |
logical. Does the lineage have the same depth? Default to |
only_tail |
Logical. If |
If there is a void rank amid a lineage, deeper ranks
will be removed. See the example with lineage3
.
The trimmed lineages. Depth could be different among them.
lineage1 <- "k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae|o__|f__"
lineage2 <- "k__Bacteria|p__Firmicutes|c__"
lineage3 <- "k__Bacteria|p__|c__Verrucomicrobiae|o__|f__"
trim_void(c(lineage1, lineage2, lineage3), same = FALSE)
trim_void(c(lineage1, lineage2, lineage3), same = FALSE, only_tail = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.