ropensci / rfishbase

R interface to the fishbase.org database
https://docs.ropensci.org/rfishbase
109 stars 40 forks source link

Information is not returning on rfishbase compared to the web browser #234

Closed nbfernan closed 1 year ago

nbfernan commented 2 years ago

I am having an issue with species data not returning expected data. When I query for a particular species, it comes back as NA yet I see on the web browser data base that the same query has data that is available online. I am using the most updated package (3.1.9).

I am having an issue with species data not returning as to be expected, meaning that when I query for a particular species, it comes back as NA yet I see on the web browser data base that the same query outputs data. I am using the most updated package (3.1.9).

Here’s an example code to get what I am trying to do:

test.sp.list <- c("Alburnus alburnus", "Catostomus commersonii", "Etheostoma blennioides", "Lepisosteus oculatus", "Lepomis macrochirus")

str(test.sp.list) # check it's a character string

validate_names(test.sp.list) # comes up as NA's for all species

species(test.sp.list, fields=c("Species","Length", "LTypeMaxM","LengthFemale", "LTypeMaxF",
                           "MaxLengthRef","CommonLength"))   # some species don't return info that is on the web browser

reproduction(test.sp.list, fields=c("Species", "RepGuild1","RepGuild2", "ParentalCare")) # all species don't return info that is on the web browser
Session Info ```r R version 4.0.5 (2021-03-31) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] forcats_0.5.1 stringr_1.4.0 purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 [6] tidyverse_1.3.1 ggplot2_3.3.5 tibble_3.1.2 rfishbase_3.1.9 dplyr_1.0.7 loaded via a namespace (and not attached): [1] Rcpp_1.0.6 lubridate_1.7.10 prettyunits_1.1.1 assertthat_0.2.1 digest_0.6.27 [6] utf8_1.2.1 R6_2.5.0 cellranger_1.1.0 backports_1.2.1 reprex_2.0.0 [11] RSQLite_2.2.7 evaluate_0.14 httr_1.4.2 pillar_1.6.1 rlang_0.4.11 [16] progress_1.2.2 curl_4.3.2 readxl_1.3.1 rstudioapi_0.13 blob_1.2.1 [21] rmarkdown_2.9 labeling_0.4.2 bit_4.0.4 munsell_0.5.0 broom_0.7.8 [26] compiler_4.0.5 modelr_0.1.8 xfun_0.24 pkgconfig_2.0.3 htmltools_0.5.1.1 [31] tidyselect_1.1.1 fansi_0.5.0 crayon_1.4.1 dbplyr_2.1.1 withr_2.4.2 [36] grid_4.0.5 jsonlite_1.7.2 gtable_0.3.0 lifecycle_1.0.0 DBI_1.1.1 [41] magrittr_2.0.1 scales_1.1.1 cli_3.0.1 stringi_1.6.2 cachem_1.0.5 [46] farver_2.1.0 fs_1.5.0 xml2_1.3.2 ellipsis_0.3.2 generics_0.1.0 [51] vctrs_0.3.8 gh_1.3.0 arkdb_0.0.12 tools_4.0.5 bit64_4.0.5 [56] glue_1.4.2 hms_1.1.0 fastmap_1.1.0 yaml_2.2.1 colorspace_2.0-2 [61] rvest_1.0.0 memoise_2.0.0 knitr_1.33 haven_2.4.1 ```
cboettig commented 2 years ago

Please re-install the most recent version (which should also require updating your version of readr, a bug in your current readr is ultimately the cause of the error -- you may just want to install.packages("readr") directly to make sure it updates).

You'll also need to purge the existing database, e.g. with

fs::dir_delete(rfishbase:::db_dir())