rfishbase icon indicating copy to clipboard operation
rfishbase copied to clipboard

Spanish language for common_to_sci not working

Open angle-zhang opened this issue 2 years ago • 1 comments

I have a database of common names in Spanish along with some information. I am hoping to find the scientific names for these fish, but when I run the code below, I get a dataframe with results that lead me to believe the query didn't work. Please let me know if this is a bug and if there's a workaround for this.

Thanks for all your work and your response in advance!

Code scinames_fb=rfishbase::common_to_sci(com_names_es_key$common_name_es, Language="Spanish")

Results image

version R version 4.1.0 (2021-05-18) os macOS Catalina 10.15.3 system x86_64, darwin17.0 ui RStudio language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz America/Los_Angeles date 2022-06-08 rstudio 1.4.1717 Juliet Rose (desktop) pandoc NA

rfishbase 4.0.0 2021-12-14 [1] CRAN (R 4.1.0)


angle-zhang avatar Jun 09 '22 00:06 angle-zhang

Thanks for the bug report, I'll take a look.

Meanwhile, consider filtering from the raw common name table:

library(dplyr)
library(rfishbase)
all_spanish <- rfishbase::fb_tbl("comnames") |> filter(Language == "Spanish")

cboettig avatar Jun 09 '22 17:06 cboettig