ropensci / taxa

taxonomic classes for R
https://docs.ropensci.org/taxa
Other
48 stars 12 forks source link

New utility functions #15

Closed zachary-foster closed 7 years ago

zachary-foster commented 7 years ago

There are a few "utility" functions I am thinking about adding in the same family as subtaxa, supertaxa, and roots.

tips or leaves

This would return all the taxa with no subtaxa. It would be useful when transforming a taxonomy into a hierarchies.

Which name do you like better? leaves is consistent with roots and stems, but tips is shorter...

stems

This would return only taxa between a root (NA) and the first taxon with more than one subtaxon. I find I often want to quickly remove these taxa since their information is not needed in many contexts (e.g. you have a dataset with only animals, but you still have "cellular organisms; Eukaryota; Opisthokonta" in front of everything.

sckott commented 7 years ago

Nice, both sound good.

I like leaves over tips, as you said more consistent with other names

stems sounds good

zachary-foster commented 7 years ago

This is done now. I just realized I made the changed on the issue-9 branch. I intended to make another branch.

If they look good to you I will close this.

sckott commented 7 years ago

that's okay, yeah, looks good to me.

zachary-foster commented 7 years ago

Nice