trim_void {yatah} | R Documentation |
Trim void ranks in lineages
Description
Trim void ranks in lineages
Usage
trim_void(lineage, same = TRUE, only_tail = FALSE)
Arguments
lineage |
string. Vector of lineages. |
same |
logical. Does the lineage have the same depth? Default to |
only_tail |
Logical. If |
Details
If there is a void rank amid a lineage, deeper ranks
will be removed. See the example with lineage3
.
Value
The trimmed lineages. Depth could be different among them.
Examples
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)
[Package yatah version 1.0.0 Index]