Skip to content

Commit

Permalink
use lengths()
Browse files Browse the repository at this point in the history
  • Loading branch information
ms609 committed Feb 23, 2024
1 parent dcfe3f8 commit 91e3cb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/tree_distance_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ CalculateTreeDistance <- function(Func, tree1, tree2 = NULL,
}

.CheckLabelsSame <- function(labelList) {
nTip <- unique(vapply(labelList, length, 0L))
nTip <- unique(lengths(labelList))
if (length(nTip) != 1) {
stop("All trees must contain the same number of leaves.")
}
Expand Down

0 comments on commit 91e3cb7

Please sign in to comment.