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 87e4da9 commit dcfe3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/tree_distance_kendall-colijn.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ KCVector <- function(tree) {
mrca <- apply(is, 2, function(i)
max(intersect(ancestors[[i[1]]], ancestors[[i[2]]])))

rootDist <- vapply(ancestors, length, integer(1))
rootDist <- lengths(ancestors)
structure(rootDist[mrca], Size = nTip, class = "dist")
}

Expand Down

0 comments on commit dcfe3f8

Please sign in to comment.