ropensci / taxa

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

Add example somewhere for how to reassign data to a rank #159

Open zachary-foster opened 6 years ago

zachary-foster commented 6 years ago

We had the following comment on a review:

For example, bodiversity data sets often contain mutliple columns denoting the taxon (order, family, genus, etc) because often questions for those data require aggregating at different levels. One of the problems with this is that as a result the taxon information in the dataset is highly denormalized, with corresponding problems as a result. How would taxa, if at all, come in here to help?

This would be handled by filter_taxa with taxon_ranks for named ranks or n_supertaxa if there are no named ranks. Simply removing lower ranks (species) will reassign data to remaining higher ranks (family) automatically.

It might be nice to have a "cookbook" vignette that just a long list of random ticks like this to solve common problems.