View source: R/check_tax_uniqueness.R
check_tax_uniqueness | R Documentation |
This function checks for the duplicate taxonomy names that can occur in different groups (e.g., the same genus names in different families).
check_tax_uniqueness(x, col = "k", return_all = F, dropNA = T)
x |
Data frame with taxonomy (columns = taxonomy ranks, rows = species) |
col |
Column name (taxonomy rank) that should be checked for uniqueness |
return_all |
Logical; default, FALSE - only non-unique values will be returned |
dropNA |
Logical; default, TRUE - missing values within the selected column ('col') will be removed |
Data frame with counts of taxon occurence (by default, only non-unique values will be shown).
datt <- data.frame(
Kingdom = rep(LETTERS[1:2], each = 6),
Phylum = rep(LETTERS[3:6], each = 3),
Class = rep(letters[1:6], times = 2),
stringsAsFactors = F
)
check_tax_uniqueness(datt, col = "Phylum") # All ranks of Phylum are unique
check_tax_uniqueness(datt, col = "Class") # Classes are duplicated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.