Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Sep 10, 2024
1 parent c0daad1 commit f191bb4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/superTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ superTree <- function(tree, method = "MRP", rooted = FALSE, trace = 0,
}
res <- my.supertree(tree, trace = trace, ...)
if (rooted) {
if (inherits(res, "multiPhylo")) {
res <- lapply(res, root, "ZZZ")
res <- lapply(res, drop.tip, "ZZZ")
class(res) <- "multiPhylo"
}
else {
# if (inherits(res, "multiPhylo")) { # root
# res <- lapply(res, root, "ZZZ")
# res <- lapply(res, drop.tip, "ZZZ")
# class(res) <- "multiPhylo"
# }
# else {
res <- root(res, "ZZZ")
res <- drop.tip(res, "ZZZ")
}
# }
}
if (inherits(res, "multiPhylo")) {
fun <- function(x) {
Expand Down

0 comments on commit f191bb4

Please sign in to comment.