gustavobio / flora

R package (including shiny web app) for interacting with the Brazilian Flora Checklist. All data included.
29 stars 10 forks source link

[improvement] Option for get.taxa to replace synonims but return a column with the replaced synonim #19

Open Lobz opened 2 months ago

Lobz commented 2 months ago

When you submit a name for get.taxa that is both mispelled and a synonim, you get a data.frame that contains the original mispelled name and the correct scientific name, but you lose the intermediate suggested synonim

> get.taxa("Myrcia lkingua")
     id               scientific.name accepted.name    family taxon.rank
1 10699 Myrcia guianensis (Aubl.) DC.          <NA> Myrtaceae    species
  taxon.status        search.str threat.status                           notes
1     accepted Myrcia guianensis            LC was misspelled|replaced synonym
  original.search
1  Myrcia lkingua

My suggestion is that the data.frame could also contain this suggested name, like this:

     id               scientific.name accepted.name    family taxon.rank
1 10699 Myrcia guianensis (Aubl.) DC.          <NA> Myrtaceae    species
  taxon.status        search.str threat.status                           notes
1     accepted Myrcia guianensis            LC was misspelled|replaced synonym
  original.search suggested.name
1  Myrcia lkingua  Myrcia lingua