knitr::opts_chunk$set(echo = TRUE) devtools::load_all() library(knitr)
remotes::install_github("liibre/Rocc") library(Rocc)
The function check_status
makes preliminary check in a scientific name, catching most common errors in species names such as:
not_Genus_epithet_format
: scientific name not following the expected pattern genus and epithet separated by spacevariety
: species scientific name with varietysubspecies
: species scientific name with subspeciesconferre
: open nomenclature cf. in species scientific nameaffinis
: open nomenclature aff. in species scientific namename_w_authors
: species scientific name has authorsnot_name_has_digits
: species scientific name has digits, not a valid nameindet
: species identified only at genus levelfamily_as_genus
: species family as genus, not a valid namenon_ascii
: species name has non ASCII characters, not a valid namehybrid_species
: hybrid speciesspecies <- c("Lindsaea lancea var. falcata", "Asplenium Aff. truncorum", "Aspidosperma discolor", "Aspidosperma Discolor", "Aspidosperma discolor A.DC.", "Aspidosperma cf. discolor", "Aspidosperma CF. discolor", "Aspidosperma aff. discolor", "Aspidosperma Aff. discolor", "Aspidosperma sp. discolor", "Aspidosperma cf.discolor", "Aspidosperma dicolor", "Apocynaceae Aspidosperma", "Aspidosperma cf. discolor A.DC.", "Aspidosperma aff. discolor A.DC.", "Aspidosperma discolor A. & DC.", "Asplenium sp.", "Asplenium sp 2", "Asplenium sp. nov. truncorum", "Asplenium truncorum 2", "cf. Piper dilatatum", "Piper dilatatum sp. nov.", "aff. Piper dilatatum", "Miconia albicans (Sw.) Triana", "Miconia albicans (Sw.) TRIana", "Bowlesia incana f. crassifolia", "Gleicheniales", "Entrophospora R.N. Ames & R.W. Schneid. 1979", "Chamissoa acuminata Mart. var. acuminata", "incertae sedis", "Schinopsis brasiliensis var. glabra Engl.", "Byrsonima rich.", "Peronospora hyoscyami f. sp. tabacina Skalický", "Bla bla Fulano f.", "Syagrus ×andrequiceana", "Agalinis itambensisxangustifolia?", "Morganella rimosa Baseia & Alfredo sp. nov.", "S polyphylla", "Leandra euphorbioides (Naudin) D`El Rei Souza & Baumgratz", "Cyrtocymura harleyi (H.Rob.) H.Rob.", "Metrodorea mollis", "Phaseolus robustus Piper", "Catasetum ×splendens Cogn.", "Catasetum ×evangelistae V.P.Castro & G.F.Carr", "Helietta glaziovii", "Drosera ×fontinalis Rivadavia", "Diplazium lepthochlamys", "Salvinia ×delasotae C.V. Miranda & Schwartsb.", "Anemia x elephantensis", "Abutilon bedfordianum discolor", "Bauhinia ungulata cuiabensis", "Cf. Lagenocarpus cf. rigidus", "Lychnophora staavioides aff. uniflora", "Pityrogramma] calomelanos calomelanos", "Chamaecrista asplenüplia", "Myrcia multifloravar.glaucensis") df <- check_string(species)
Checking the output of check_string()
kable(df[order(df$speciesStatus, df$species), ], row.names = FALSE)
Now getting only possible correct and unique names.
ok <- c("variety", "possibly_ok", "name_w_wrong_case", "name_w_authors") df_ok <- df[df$speciesStatus %in% ok, ] species_new <- unique(df_ok$species)
First, we will check for typos and get a list of possible names.
suggest_taxa <- suggest_flora(species_new) search_taxa <- na.omit(as.character(unique(suggest_taxa$species)))
list_taxa <- lapply(search_taxa, check_flora)
Still deciding the output. The columns synonym
and scientificName_search
were added by hand inside function, other columns are exactly the same as in the API of Brazilian Flora 2020.
# L. lancea list_taxa[[1]]$taxon list_taxa[[1]]$synonyms
# para A. discolor list_taxa[[2]]$taxon list_taxa[[2]]$synonyms
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.