Trim excess text from taxa names. Doing this before querying a taxonomic authority improves matching.
(character) A list of taxa names
(character) The path to the directory containing taxa_map.csv
Characters trimmed by this function:
White spaces (trailing and leading)
Species abbreviations following a genus value (e.g. "Sp.", "Spp.", "Cf.", "Cf...", etc.)
x, then an updated list of taxa is returned.
path, then an updated version of taxa_map.csv
is written to file and returned as a data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13
# Input a list of names my_taxa <- c("Koeleria_cristata", "Cyperus sp.", "Poa Cf. ") my_taxa <- trim_taxa(x = my_taxa) my_taxa # Input taxa_map.csv data <- data.table::fread(system.file("example_data.txt", package = 'taxonomyCleanr')) my_path <- tempdir() tm <- create_taxa_map(path = my_path, x = data, col = "Species") tm <- trim_taxa(path = my_path) tm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.