ropensci / taxa

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

Make sure `filter_taxa` maintains order of taxa #96

Closed zachary-foster closed 6 years ago

zachary-foster commented 6 years ago

I think I noticed a bug caused by filter_taxa reordering taxa that passed the filter.

Before filtering:

> head(obj$taxon_ids())
  aab   aac   aad   aae   aaf   aag 
"aab" "aac" "aad" "aae" "aaf" "aag" 

After filtering:

> head(x$taxon_ids())
  aab   aae   aau   aby   aeb   ahx 
"aab" "aae" "aau" "aby" "aeb" "ahx" 

While this does not invalidate the taxmap object, it might break correspondence between taxon order and tables ordered the same way.