View source: R/get_tax_level.r
get_tax_level | R Documentation |
Processes a vector of txonomy strings and returns a vector with the specified level
get_tax_level(Tax, level = 4, sepchar = ";")
Tax |
A data.frame with a column named 'Taxonomy' which is a character vector with taxonomy strings. |
level |
The level to return |
sepchar |
The separator of each level in the taxonomy string |
It splits each taxonomy string according to separator and returns the specified level. If there are fewer levels than the specified number, it returns the value 'unclassified'
A vector of taxonomy strings truncated at the specified level
Sur Herrera Paredes
tax <- data.frame(ID = letters[1:4], Taxonomy = c('a;b;c;d','a;b','A;B;C','A;B;C;D')) get_tax_level(tax, level = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.