Closed pamdx closed 1 year ago
apologies for these issues. we have some changes coming with a new release of the data but they are not ready yet! I plan to get to this in early February.
great! Thanks for the feedback, I'm looking forward to the new release!
Ok, data updated and new release has been prepared. Can you try now:
remotes::install_github("ropensci/rfishbase")
and test again? Let me know how this goes and I'll try and get this version onto CRAN soon.
On the first use it will import the data and might be a bit slow. In general I think this new release should be faster than the current one once it's got a copy of the data stored locally. As always thanks for the bug reports, super helpful!
please re-open if this is not resolved in the 4.1.0 release
Hmmm, something's wrong: whenever I try to use fb_tbl()
, I get the R fatal error dialog below. This happens whether I try retrieving data from fishbase
or sealifebase
.
Using reprex()
tells me that R cannot find the fb_tbl()
function, though sessionInfo()
shows that rfishbase_4.1.0
is attached :
fb_tbl("synonyms", server = "fishbase")
#> Error in fb_tbl("synonyms", server = "fishbase"): could not find function "fb_tbl"
when using reprex, be sure to include library(rfishbase)
command.
meanwhile I'll see if I can test on Windows, I noticed some issues in the CI testing I couldn't diagnose.
Okay there appears to be a problem with duckdb's http plugin.
I think this will reproduce the error on Windows:
conn <- DBI::dbConnect(duckdb::duckdb())
DBI::dbExecute(conn, "INSTALL 'httpfs';")
DBI::dbExecute(conn, "LOAD 'httpfs';")
ok, try once again to reinstall from github, restart your R session, and test again? Sorry for the trouble! I think it should be okay on Windows now :crossed_fingers:
amazing, it works now! Thank you very much!
library(rfishbase)
fb_tbl("synonyms", server = "sealifebase")
#> # A tibble: 141,374 × 53
#> SynCode SpecCode SynGe…¹ SynSp…² Author Year Synon…³ Taxon…⁴ Synco…⁵ LastE…⁶
#> <int> <int> <chr> <chr> <chr> <int> <int> <chr> <int> <chr>
#> 1 27871 32307 Aaptol… americ… (Pils… 1916 19 Species NA americ…
#> 2 27872 32306 Aaptol… brinto… Newma… 1971 19 Species NA brinto…
#> 3 27873 32308 Aaptol… callis… (Pils… 1911 19 Species NA callis…
#> 4 27874 32304 Aaptol… leptod… Newma… 1971 19 Species NA leptod…
#> 5 27875 32305 Aaptol… trider… Newma… 1971 19 Species NA trider…
#> 6 86299 51720 Aaptos aaptos (Schm… 1864 19 Species NA aaptos
#> 7 155566 130062 Aaptos aaptos… Lévi,… 1961 81807 Variety NA nigra
#> 8 120162 51720 Aaptos adriat… Gray,… 1867 75097 Species NA adriat…
#> 9 198007 165941 Aaptos bergma… de La… 1950 3477 Species NA bergma…
#> 10 155567 130062 Aaptos chromis de La… 1954 81807 Species NA chromis
#> # … with 141,364 more rows, 43 more variables: Comment <chr>, Etymology <chr>,
#> # Status <chr>, Valid <int>, ValidTax <int>, Synonymy <chr>,
#> # SynonymyDetail <chr>, Combination <chr>, OriginalPub <int>,
#> # Misspelling <int>, MisspellingDetail <chr>, StatusOrder <int>,
#> # RankSearch <int>, CommentTax <chr>, GSDOriginal <int>, GSDStatus <int>,
#> # GSDVersionDate <chr>, GSDExpert <int>, CAS_SPC <int>, CAS_REF_NO <int>,
#> # CoL <chr>, CoL_GSD <chr>, CoL_ID <chr>, ZooBank_ID <int>, TSN <int>, …
Hi and thank you so much for this very useful package!
It looks like I'm facing a bug with the
fb_tbl()
function.fishbase
:sealifebase
:I'm interested in getting the
synonyms
table, but I've tried this with other tables and I get the same error code.I've also tried setting
Sys.setenv(FISHBASE_API="sealifebase")
along withfb_tbl("synonyms", server = NULL)
(as suggested here), that doesn't work either.Am I doing something wrong? Thanks very much in advance for your help!
Session Info
```r R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8 LC_MONETARY=English_United Kingdom.utf8 [4] LC_NUMERIC=C LC_TIME=English_United Kingdom.utf8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rfishbase_4.0.0 janitor_2.1.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9 purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.7 [10] ggplot2_3.3.6 tidyverse_1.3.1 loaded via a namespace (and not attached): [1] lubridate_1.8.0 prettyunits_1.1.1 assertthat_0.2.1 utf8_1.2.2 R6_2.5.1 duckdb_0.6.2 cellranger_1.1.0 backports_1.4.1 [9] reprex_2.0.1 httr_1.4.3 pillar_1.8.0 rlang_1.0.2 progress_1.2.2 curl_4.3.2 readxl_1.4.0 rstudioapi_0.13 [17] contentid_0.0.16 bit_4.0.4 munsell_0.5.0 broom_0.8.0 compiler_4.2.0 modelr_0.1.8 pkgconfig_2.0.3 askpass_1.1 [25] openssl_2.0.2 tidyselect_1.1.2 fansi_1.0.3 crayon_1.5.1 tzdb_0.3.0 dbplyr_2.2.0 withr_2.5.0 grid_4.2.0 [33] jsonlite_1.8.0 gtable_0.3.0 lifecycle_1.0.1 DBI_1.1.2 magrittr_2.0.3 scales_1.2.0 cli_3.3.0 stringi_1.7.6 [41] vroom_1.5.7 cachem_1.0.6 fs_1.5.2 snakecase_0.11.0 xml2_1.3.3 ellipsis_0.3.2 generics_0.1.3 vctrs_0.4.1 [49] tools_4.2.0 bit64_4.0.5 glue_1.6.2 hms_1.1.1 parallel_4.2.0 fastmap_1.1.0 colorspace_2.0-3 rvest_1.0.2 [57] memoise_2.0.1 haven_2.5.0 ```