emmanuelparadis / ape

Analysis of Phylogenetics and Evolution
https://emmanuelparadis.github.io/
GNU General Public License v2.0
53 stars 11 forks source link

Support n < 2 in `unique.multiPhylo()` #38

Closed ms609 closed 3 years ago

ms609 commented 3 years ago

Fixes incorrect behaviour in the case where length(x.multiPhylo) < 1

tree <- read.tree(text = '(a, b);')
c(tree, tree) # = tree
unique(c(tree) # = tree
unique(c(tree)[-1]) # = length zero multiPhylo object
emmanuelparadis commented 3 years ago

Thanks!