rfishbase icon indicating copy to clipboard operation
rfishbase copied to clipboard

multiple entries of FoodTroph for a species

Open andybeet opened this issue 5 years ago • 1 comments

I am obtaining multiple values for FoodTroph in the ecology table

rfishbase::ecology(species_list="Oncorhynchus clarkii", server = "fishbase") %>% dplyr::select(Species,DietTroph,FoodTroph)

results in:

Species DietTroph FoodTroph 1 Oncorhynchus clarkii NA 3.77 2 Oncorhynchus clarkii NA 4.01

Is this a bug or a data entry issue in fishbase? I also see a value of 4.01 in the estimate table

Session Info
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] magrittr_1.5

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2       rstudioapi_0.10  hms_0.5.1        tidyselect_0.2.5
 [5] R6_2.4.0         rlang_0.4.0      fansi_0.4.0      stringr_1.4.0   
 [9] httr_1.4.1       dplyr_0.8.3      tools_3.6.1      utf8_1.1.4      
[13] cli_1.1.0        indexPPR_0.1.0   assertthat_0.2.1 digest_0.6.20   
[17] tibble_2.1.3     crayon_1.3.4     purrr_0.3.2      readr_1.3.1     
[21] vctrs_0.2.0      curl_4.0         zeallot_0.1.0    memoise_1.1.0   
[25] glue_1.3.1       gh_1.0.1         stringi_1.4.3    compiler_3.6.1  
[29] pillar_1.4.2     backports_1.1.4  rfishbase_3.0.4  jsonlite_1.6    
[33] pkgconfig_2.0.2 

andybeet avatar Jan 17 '20 21:01 andybeet

I don't know is the short answer.

The species page https://www.fishbase.de/summary/2688 has the stockcode 2884, and the value 3.77 . Not sure why the other entry is there.

@cboettig ?

sckott avatar Jan 21 '20 18:01 sckott

clearing out some old issues here, apologies.

It's usually best to compare to the whole table, e.g.

ecology(species_list="Oncorhynchus clarkii", server = "fishbase")

Note that this species includes multiple unique stocks (different populations). Important to remember that not all fishbase data is collated to the species level, and some tables involve individuals (eg. diet() ).

cboettig avatar Feb 12 '23 05:02 cboettig