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

Add a option similar to value that controls how results are named #55

Open
7 tasks
zachary-foster opened this issue Jun 2, 2017 · 0 comments
Open
7 tasks
Assignees
Milestone

Comments

@zachary-foster
Copy link
Collaborator

zachary-foster commented Jun 2, 2017

Currently, results of functions like supertaxa return taxon information named by taxon id:

> ex_taxmap$supertaxa(subset = taxon_ranks == "species", value = "taxon_names")
$`12`
         7          3          1 
"Panthera"  "Felidae" "Mammalia" 

$`13`
         8          3          1 
   "Felis"  "Felidae" "Mammalia"

...

It would be nice to reuse the code for value to add an option like name_value that controls how each result is named.

It would work like this:

> ex_taxmap$supertaxa(subset = taxon_ranks == "species", value = "taxon_names", name_value = "taxon_ranks")
$`12`
         genus          family         class 
"Panthera"  "Felidae" "Mammalia" 

$`13`
         genus          family         class 
   "Felis"  "Felidae" "Mammalia"

...

This would allow for making mappings between any two variables in all_names()

  • obs
  • subtaxa
  • leaves
  • roots
  • stems
  • supertaxa
  • classifications
@zachary-foster zachary-foster self-assigned this Jun 2, 2017
@zachary-foster zachary-foster added this to the v0.2 milestone Jul 18, 2017
@sckott sckott modified the milestones: v0.2, v0.3 Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants