New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using species_list to generate a list of species from multiple families #136
Comments
please include your R session info, thanks |
R version 3.4.4 (2018-03-15) -- "Someone to Lean On" |
It seems to work when I include 2 families, but anything more than 3 and it blows up. |
@cboettig it's not clear to me if this https://github.com/ropensci/rfishbase/blob/master/R/species_list.R#L69-L82 is supposed to handle more than 1 name as input, or only 1 at a time? It's looking to me like it is supposed to only handle 1 at a time. if so should we document and stop on names > length == 1 ? |
Okay, so essentially I will need to do a separate species_list for each of the 290 families I need species lists from? |
you might have to, but i'm trying to figure out from my colleague (@cboettig ) what a function does that he wrote |
@fishkey yeah, looks like that function isn't gracefully handling the fact that it's not finding any species in your third family. You can see this by doing the vectorization 'manually', i.e. out <- sapply(c("Chlamydoselachidae", "Hexanchidae", "Heptranchidae"), function(x) species_list(Family=x))
Meanwhile, it's easy enough to work around using the fill taxa table and a bit of standard library(dplyr)
library(rfishbase)
fish <- rfishbase::load_taxa()
myfish <- fish %>%
filter(Family %in% c("Chlamydoselachidae", "Hexanchidae", "Heptranchidae")) |
@sckott @cboettig thanks very much for your help!! the dplyr, etc. method worked very well. i dug more into why fishbase wasn't returning species for some families and there seem to be four things going on here, one of which you might want to hear about. (1) spelling changes between fossil record entries and fishbase (generally, changing from 'didae' to 'dae') The 4th issue is the only one that puzzles me, and its not a big deal because it only occurred for ~1% of the families in my list. Anyway, thanks again for your help on this! |
(i assume you didn't mean to close @cboettig ) |
well, I think we've resolved the title issue(?) but we should let Matt close it out to confirm. database syncing is probably a separate issue, yes? |
RE 4: our last Fishbase database update is from December 2017 https://fishbase.ropensci.org/versions/ - so entirely possible that it's a problem of newer data that we don't have yet. we've done 1 year apart between most updates. although in an ideal world, we'd have updates much more often 😏 |
Hi Scott
You are not that far off actually. Our latest update was March 2018. That was the one that followed December 2017. We are at a transition phase, and we can only assure updates on a three month basis. Sorry, please contact us again once we are on our way more smoothly sometime in June.
FishBase and SeaLifeBase are changing hands, we will now be under Quantitative Aquatics, Inc. And as you know with administrative changes, operational technical work can be affected.
Please bear with us as we go through this transition.
Thanks
Deng
Sent from Mail for Windows 10
From: Scott Chamberlain
Sent: April 12, 2018 11:20 AM
To: ropensci/rfishbase
Cc: Subscribed
Subject: Re: [ropensci/rfishbase] Using species_list to generate a list ofspecies from multiple families (#136)
RE 4: our last Fishbase database update is from December 2017 https://fishbase.ropensci.org/versions/ - so entirely possible that it's a problem of newer data that we don't have yet.
we've done 1 year apart between most updates. although in an ideal world, we'd have updates much more often 😏
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
thanks for the update @Dengaloo - Is it possible to get the March 2018 update? Or wait until June? |
Hi Scott
Might be prudent to wait until June since nobody will be free to do the copy for rfishase right now.
Thanks
Deng
Sent from Mail for Windows 10
From: Scott Chamberlain
Sent: April 12, 2018 11:49 AM
To: ropensci/rfishbase
Cc: Dengaloo; Mention
Subject: Re: [ropensci/rfishbase] Using species_list to generate a list ofspecies from multiple families (#136)
thanks for the update @Dengaloo - Is it possible to get the March 2018 update? Or wait until June?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Okay, sounds good. |
I have a list of 290 families that I am trying to use to generate a list of the respective species within them. I have been using species_list(Family = c('Family1','Family2','Family3')) to attempt this, but I get the following error. Why isn't this working? It seems straight forward enough.
Warning message:
In Family == c("Chlamydoselachidae", "Hexanchidae", "Heptranchidae", :
longer object length is not a multiple of shorter object length
The text was updated successfully, but these errors were encountered: