- bp2 <- .Call("bipartition", y$edge, n, y$Nnode, PACKAGE = "ape")
- bp2 <- lapply(bp2, function(xx) sort(y$tip.label[xx]))
+ ## fix by Tim Wallstrom:
+ bp2.tmp <- .Call("bipartition", y$edge, n, y$Nnode, PACKAGE = "ape")
+ bp2 <- lapply(bp2.tmp, function(xx) sort(y$tip.label[xx]))
+ bp2.comp <- lapply(bp2.tmp, function(xx) setdiff(1:n, xx))
+ bp2.comp <- lapply(bp2.comp, function(xx) sort(y$tip.label[xx]))
+ ## End