Skip to content
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

How do I get the taxonomic classification of the fish species? #126

Closed
tjquimpo opened this issue Jul 12, 2017 · 8 comments
Closed

How do I get the taxonomic classification of the fish species? #126

tjquimpo opened this issue Jul 12, 2017 · 8 comments
Milestone

Comments

@tjquimpo
Copy link

@tjquimpo tjquimpo commented Jul 12, 2017

Hello,

I loaded my targeted species using the species_list and species functions. However, I could not find a function that extracted the higher taxonomic classifications (e.g. orders, class, etc.). I read in Boettiger et al. (2012) that you can use the fish_names function; but, in the current version of rfishbase, this function is no longer available. Are there any similar function(s) wherein I can load the other taxonomic units? Many thanks.

Respectfully,
Tim

@cboettig
Copy link
Member

@cboettig cboettig commented Jul 12, 2017

Check out all the columns of the data frame returned rfishbase::load_taxa(), that should have all the taxonomic ranks (according to FishBase taxonomy, which may differ from other authorities), for all species in FishBase.

Apologies, the 2012 publication is now quite out of date relative to the current version of the package.

HTH,

Carl

sckott added a commit that referenced this issue Jul 12, 2017
@sckott
Copy link
Member

@sckott sckott commented Jul 12, 2017

also added a taxonomy() fxn - reinstall to get it - thoughts on it @cboettig ? keep or get rid of? changes?

@sckott
Copy link
Member

@sckott sckott commented Jul 12, 2017

see also #92

@cboettig
Copy link
Member

@cboettig cboettig commented Jul 12, 2017

Nice, thanks @sckott. Can you add an example of this in the readme.rmd too?

@sckott
Copy link
Member

@sckott sckott commented Jul 12, 2017

sure thing

@sckott
Copy link
Member

@sckott sckott commented Jul 12, 2017

One thing about the /taxonomy route is that we set it up so that it only accepts the query parameters genus and species - so we can't do the thing of passing in a species list like in other fxns

so users have to do lapply or so, like

spp <- list(c("Oreochromis", "amphimelas"), c("Oreochromis", "mweruensis"))
Map(function(x) taxonomy(x[1], x[2]), spp)

is that acceptable? or too cumbersome?

@sckott
Copy link
Member

@sckott sckott commented Jul 12, 2017

i guess one option is to do allow passing in a list of genus+epithet names, and internally break names into genus, species, and map over each name

sckott added a commit that referenced this issue Jul 12, 2017
make it so that one of genus or species, or both are required
added taxonomy() eg to readme
@cboettig
Copy link
Member

@cboettig cboettig commented Jul 12, 2017

Good questions. Yeah, obviously a consistent query interface would be nice, though I suppose if necessary that could be done merely on the R level, so the R user could pass the same species_list.

Having a way to return the full taxonomy table, a la load_taxa() is probably helpful though, since I think a common use case for the taxonomy table is actually to start with a larger group, e.g. Family, and get a list of all species in that family for later use in the other functions.

@cboettig cboettig modified the milestone: 2.2.0 Jul 12, 2017
@cboettig cboettig closed this Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.