Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Nov 29, 2024
1 parent 41eba40 commit fd0fb46
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions R/treeManipulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -864,16 +864,16 @@ relabel <- function(x, ref) {
}


#checkLabels <- function(tree, tip) {
# ind <- match(tree$tip.label, tip)
# if (any(is.na(ind)) | length(tree$tip.label) != length(tip)) {
# stop("tree has different labels")
# }
# tree$tip.label <- tip
# ind2 <- tree$edge[, 2] <= Ntip(tree)
# tree$edge[ind2, 2] <- ind[tree$edge[ind2, 2]]
# tree
#}
checkLabels <- function(tree, tip) {
ind <- match(tree$tip.label, tip)
if (any(is.na(ind)) | length(tree$tip.label) != length(tip)) {
stop("tree has different labels")
}
tree$tip.label <- tip
ind2 <- tree$edge[, 2] <= Ntip(tree)
tree$edge[ind2, 2] <- ind[tree$edge[ind2, 2]]
tree
}



Expand Down

0 comments on commit fd0fb46

Please sign in to comment.