ropensci / taxize

A taxonomic toolbelt for R
https://docs.ropensci.org/taxize
Other
270 stars 61 forks source link

classification(sci_id = '[species name]', db = 'worms') not working #891

Closed EmilyMarkowitz-NOAA closed 1 year ago

EmilyMarkowitz-NOAA commented 2 years ago

I am getting "Not Found"'s when searching for WoRMS species IDs using species's scientific names. I tried this with a few other species from WoRMS and couldn't get the function to retrieve a species ID number for those species, either. Below I use the example from the ?taxize::classification documentation. I also tried this code using the ITIS database and it worked fine. I suspect that the taxize::classification() function is just searching from the wrong column in WoRMS?

I tried this with R 4.1.2 and the latest CRAN (0.9.99) and GitHub (0.9.99.947) versions of {taxize} and got the same result.

classification(sci_id = 'Gadus morhua', db = 'worms') # did not work

==  1 queries  ===============

Retrieving data for taxon 'Gadus morhua'

x  Not Found:  Gadus morhua
==  Results  =================

* Total: 1 
* Found: 0 
* Not Found: 1
$`Gadus morhua`
[1] NA

attr(,"class")
[1] "classification"
attr(,"db")
[1] "worms"

However, if I search Gadus morhua's WoRMS ID (126436), I do get a return.

classification(sci_id = 126436, db = 'worms') # worked

$`126436`
A tibble: 12 x 3
   name           rank            id
   <chr>          <chr>        <int>
 1 Animalia       Kingdom          2
 2 Chordata       Phylum        1821
 3 Vertebrata     Subphylum   146419
 4 Gnathostomata  Infraphylum   1828
 5 Osteichthyes   Parvphylum  152352
 6 Actinopterygii Gigaclass    10194
 7 Actinopteri    Class       843664
 8 Teleostei      Subclass    293496
 9 Gadiformes     Order        10313
10 Gadidae        Family      125469
11 Gadus          Genus       125732
12 Gadus morhua   Species     126436

attr(,"class")
[1] "classification"
attr(,"db")
[1] "worms"
zachary-foster commented 2 years ago

This is due to some odd behavior of the dependency package crul on Windows. See:

https://github.com/ropensci/taxize/issues/888

I hope to have a fix for this released to CRAN in the next few days

EmilyMarkowitz-NOAA commented 1 year ago

This has been fixed - thanks for your hard work on this package!