is_rank: Test if a lineage goes down to a specified rank

Description Usage Arguments Value Examples

View source: R/is_tests.R

Description

Test if a lineage goes down to a specified rank

Usage

1
2
3
4
5
is_rank(
  lineage,
  rank = c("kingdom", "phylum", "class", "order", "family", "genus", "species",
    "strain")
)

Arguments

lineage

string. Vector of lineages.

rank

string. One of c("kingdom", "phylum", "class", "order", "family", "genus", "species", "strain") with partial matching.

Value

logical.

Examples

1
2
3
4
lineage1 <- "k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae"
lineage2 <- "k__Bacteria|p__Firmicutes|c__Clostridia"
is_rank(c(lineage1, lineage2), "class")
is_rank(c(lineage1, lineage2), "order")

yatah documentation built on March 1, 2020, 5:08 p.m.