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

refactor `leaves` to return a vector per taxon like `subtaxa` #127

Closed
zachary-foster opened this issue Jan 31, 2018 · 1 comment
Closed

refactor `leaves` to return a vector per taxon like `subtaxa` #127

zachary-foster opened this issue Jan 31, 2018 · 1 comment
Milestone

Comments

@zachary-foster
Copy link
Collaborator

@zachary-foster zachary-foster commented Jan 31, 2018

Leaves currently does:

> leaves(ex_taxmap)
 m  n  o  p  q  r 
12 13 14 15 16 17 

Which makes sense, but issue #126 assumes that there is a list output with one vector like that above per taxon, like subtaxa does:

> subtaxa(ex_taxmap)
$b
 [1]  3  7 12  8 13  4  9 14  5 10 15

$c
[1]  6 11 16 17

$d
[1]  7 12  8 13
...

I can add the simplify option to leaves, so it can work like it did in the past:

> subtaxa(ex_taxmap, simplify = TRUE)
 [1]  3  7 12  8 13  4  9 14  5 10 15  6 11 16 17

If we want to maintain the same behaviour as before, the default can be simplify = TRUE, although that would be different than the other functions. What do you think @sckott? Ok to change the default output of leaves, while maintain the ability to return the same output with simplify = TRUE?

zachary-foster added a commit that referenced this issue Jan 31, 2018
…" options some

resolves #128
resolves #126
resolves #120
relates to #127
@zachary-foster
Copy link
Collaborator Author

@zachary-foster zachary-foster commented Feb 14, 2018

This is done

@zachary-foster zachary-foster mentioned this issue Apr 5, 2018
3 of 3 tasks complete
@zachary-foster zachary-foster added this to the v0.2.1 milestone Apr 10, 2018
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
1 participant
You can’t perform that action at this time.