--- title: "Compatibility with taxize and WorldFlora" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Compatibility with taxize and WorldFlora} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- [taxize](https://docs.ropensci.org/taxize/) (Chamberlain and Szöcs [2013](https://f1000research.com/articles/2-191/v2)) gives R a set of verbs for taxonomic names, answered by about twenty web services: resolving a name, listing its synonyms, its children and the ranks above it, translating common names. [WorldFlora](https://cran.r-project.org/package=WorldFlora) (Kindt [2020](https://doi.org/10.1002/aps3.11388)) matches plant names, exactly and by spelling distance, against the World Flora Online (WFO) backbone, and reduces the candidates to one row per name. taxify uses taxize's verbs, with the same names and tasks, and WorldFlora's workflow of matching exactly, then by spelling distance, and keeping one row per name. It performs the name-resolution step of taxize and WorldFlora, run offline against local backbone files, for 19 backbones in one call. This article runs the same tasks in WorldFlora and taxify and measures where they agree, maps the functions of both packages to taxify's, and lists the cases where taxize or WorldFlora is the better choice. taxify aims to give the same accepted names as WorldFlora on the same WFO release, with documented differences in how one record is chosen when a name has several. Installation is covered in [Get started](taxify.html). 1. **Match** the same names in both packages and compare the accepted names. 2. **Map** each taxize and WorldFlora function to its taxify counterpart. 3. **Check** the agreement on your own list before relying on either result. ``` r library(taxify) ``` ## Matching the same names in both packages WorldFlora reads the WFO classification file into memory and matches with fuzzy matching on: ``` r library(WorldFlora) wfo_data <- data.table::fread("classification.csv", encoding = "UTF-8") names <- c("Quercus robur", "Quercus pedonculata", "Pinus silvestris", "Rosa canina") matched <- WFO.match(spec.data = names, WFO.data = wfo_data, Fuzzy = 0.1) best <- WFO.one(matched) ``` `scripts/agreement-worldflora.R` in the taxify repository runs this code; the accepted name WorldFlora returned for each input, in `scientificName`, and whether the match was fuzzy: |Input |WorldFlora accepted name |Fuzzy | |:-------------------|:------------------------|:-----| |Quercus robur |Quercus robur |FALSE | |Quercus pedonculata |Quercus robur |TRUE | |Pinus silvestris |Pinus sylvestris |TRUE | |Rosa canina |Rosa canina |FALSE | taxify matches the same names against its WFO backbone: ``` r names <- c("Quercus robur", "Quercus pedonculata", "Pinus silvestris", "Rosa canina") res <- taxify(names, backbone = "wfo", verbose = FALSE) res[, c("input_name", "accepted_name", "match_type")] #> input_name accepted_name match_type #> 1 Quercus robur Quercus robur exact #> 2 Quercus pedonculata Quercus robur fuzzy #> 3 Pinus silvestris Pinus sylvestris exact_ci #> 4 Rosa canina Rosa canina exact #> Sources: WFO 2026.06 | cite() for full citations ``` Both packages give the same four accepted names. *Quercus pedonculata* is a misspelling of *Quercus pedunculata*, which WFO treats as a synonym of *Quercus robur*, and both reach *Quercus robur* through a fuzzy match. *Pinus silvestris* is fuzzy in WorldFlora; taxify reads the epithet's *i* and *y* as the same letter and matches it with `match_type = "exact_ci"`. The second task, the synonyms of one accepted name, is `WFO.synonyms()` in WorldFlora and `synonyms()` in taxify: ``` r syn <- synonyms("Picea abies", backbone = "wfo", verbose = FALSE) length(unique(syn$synonym)) #> [1] 164 ``` For *Picea abies*, the script recorded 171 synonyms from WorldFlora and 164 from taxify, of which 163 appear in both. ## Agreement on a sample of WFO names The same script draws 300 names of species rank from taxify's WFO backbone with a fixed seed (97 accepted, 172 synonyms, 31 unchecked), matches them in both packages without fuzzy matching, and compares the accepted names: - 277 names have the same accepted name in both. - 18 have different accepted names. For 13 of them, taxify reports more than one accepted taxon behind the spelling (`n_ids` above 1), and the two packages chose different records. - 5 names found no match in WorldFlora's file. The run used taxify 0.7.0 with its WFO backbone 2026.06, and WorldFlora 1.14.5 with the WFO classification file of the Zenodo release named in `scripts/benchmark-worldflora.R`. The two can be different WFO releases; this run does not separate differences in the data from differences in the matching. The comparison covers exact matching of species names; it does not show agreement on misspelt names, infraspecific names or names outside WFO. To check your own list, run it through both packages and compare `accepted_name` from `taxify(backbone = "wfo")` with `scientificName` from `WFO.one()`. For the names that differ, `taxify_ids()` lists every accepted taxon taxify found behind the name, as shown in [Exploring the backbone](exploring.html). ## Functions of taxize | taxize | taxify | Notes | |---|---|---| | `gnr_resolve()`, `gna_verifier()` | `taxify()` | Best match per name, against any backbone | | `get_tsn()`, `get_gbifid()` and the other `get_*id()` | `taxify()` | The ID is in `taxon_id` and `accepted_id` | | `classification()` | `upstream()`, `add_classification()` | One taxon as rows, or a result as columns | | `tax_name()` | `taxify()` | `family`, `genus` and `rank` are columns | | `synonyms()` | `synonyms()` | Every synonym of the accepted taxon | | `children()` | `children()` | Accepted taxa of a genus or family | | `downstream()` | `downstream()` | Accepted taxa at any rank below a taxon | | `upstream()` | `upstream()` | The ranks above a taxon | | `sci2comm()`, `comm2sci()` | `sci2comm()`, `comm2sci()` | From the vernacular names of GBIF, NCBI and the Open Tree of Life | | `id2name()` | `id2name()` | A backbone ID to its name and accepted name | | `class2tree()` | `class2tree()` | A taxonomy tree from the classifications | | `lowest_common()` | `lowest_common()` | The lowest rank a set of names shares | The table maps taxize 0.10.1. taxize answers from the web service named in each call, at the time of the call; taxify answers from the backbone version on disk, recorded in every row. ## Functions of WorldFlora | WorldFlora | taxify | Notes | |---|---|---| | `WFO.match()`, `WFO.match.fuzzyjoin()` | `taxify(backbone = "wfo")` | Exact and fuzzy matching in one call | | `WFO.one()` | `taxify()` | One row per name | | `WFO.synonyms()` | `synonyms(backbone = "wfo")` | The synonyms of a taxon | The table maps WorldFlora 1.14.5. `WFO.match()` returns the WFO columns under their WFO names and every candidate within the fuzzy threshold; `taxify()` returns `matched_name`, `taxon_id`, `taxonomic_status` and `accepted_id`, and `add_wfo_info()` adds WFO's further columns. ## Differences **Choosing one record.** When a spelling leads to several accepted taxa, `WFO.one()` keeps one candidate row and taxify keeps one pick with the others in `accepted_ids`. The two rules can choose different records, which is where most of the differences in the sample come from. taxify's order of choice is described in [How names are matched](fuzzy-matching.html#names-with-more-than-one-accepted-taxon). **Spelling distance.** WorldFlora's `Fuzzy` argument and taxify's `fuzzy_threshold` measure the distance between spellings differently, so the same number does not select the same candidates. taxify also makes spelling variants of Latin equal before fuzzy matching, as for *Pinus silvestris* above. **The data.** WorldFlora matches against the WFO file a user downloads; taxify against its WFO backbone, built from a WFO release and recorded in `backbone_version`. ## Timings against WorldFlora `scripts/benchmark-worldflora.R` in the taxify repository times both packages on accepted WFO binomials, as they are and with one letter of each epithet changed so that they need fuzzy matching. The run recorded in `scripts/benchmark-worldflora-results.json` used taxify 0.7.0, vectra 0.13.0 and WorldFlora 1.14.5 under R 4.6.0 on Windows 11 x64 (build 26200), on 2026-10-13: | Task | taxify (s) | WorldFlora (s) | |---|---|---| | Load the backbone | 1.6 | 14.0 | | 1000 names, exact | 1.0 | 14.2 | | 1000 names, fuzzy | 9.7 | 3881.9 | The timings measure how long each package takes for these names on one machine; they say nothing about which result is right. WorldFlora's fuzzy matching (`Fuzzy = 0.1`) returns every candidate within the threshold, and taxify returns one pick per name. ## When taxize or WorldFlora fits better - **A name added since the last backbone release.** taxize, and the clients of single services ([rgbif](https://docs.ropensci.org/rgbif/), [worrms](https://docs.ropensci.org/worrms/), [ritis](https://docs.ropensci.org/ritis/)), query the current version. - **Choosing among candidates by hand.** WorldFlora and taxize return every candidate for a person to choose from. - **A method with a peer-reviewed description.** WorldFlora is described in a peer-reviewed paper (Kindt 2020); taxify's checks are its own test suite and the comparisons above. - **Other packages.** [taxadb](https://docs.ropensci.org/taxadb/) keeps local backbone snapshots and looks names up with `filter_name()`; lcvplants matches the Leipzig Catalogue of Vascular Plants with `lcvp_search()`, as `taxify(backbone = "lcvp")` does. rWCVP (archived on CRAN in 2025) and Taxonstand (archived in 2023, The Plant List) are continued by `taxify(backbone = "wcvp")` and `taxify(backbone = c("wcvp", "wfo"))`. ## Where next - [Get started](taxify.html): matching, checking and joining data in one session. - [Exploring the backbone](exploring.html): the functions that correspond to taxize's. - [How names are matched](fuzzy-matching.html): the stages and the choice of one record. ## References Chamberlain S, Szöcs E (2013). taxize: taxonomic search and retrieval in R. *F1000Research* 2: 191. Kindt R (2020). WorldFlora: An R package for exact and fuzzy matching of plant names against the World Flora Online taxonomic backbone data. *Applications in Plant Sciences* 8(9): e11388.