diff --git a/R/tree_distance_msd.R b/R/tree_distance_msd.R index 181f3af1..f65cb35e 100644 --- a/R/tree_distance_msd.R +++ b/R/tree_distance_msd.R @@ -39,8 +39,8 @@ #' @export MatchingSplitDistance <- function(tree1, tree2 = NULL, normalize = FALSE, reportMatching = FALSE) { - unnormalized <- CalculateTreeDistance(MatchingSplitDistanceSplits, tree1, tree2, - reportMatching) + unnormalized <- CalculateTreeDistance(MatchingSplitDistanceSplits, tree1, + tree2, reportMatching) # Return: NormalizeInfo(unnormalized, tree1, tree2, how = normalize, diff --git a/R/tree_distance_utilities.R b/R/tree_distance_utilities.R index 740fa33b..6584cbaa 100644 --- a/R/tree_distance_utilities.R +++ b/R/tree_distance_utilities.R @@ -475,7 +475,10 @@ NormalizeInfo <- function(unnormalized, tree1, tree2, InfoInTree, CombineInfo <- function(tree1Info, tree2Info, Combiner = Combine, pairwise = FALSE) { if (length(tree1Info) == 1 || length(tree2Info) == 1 || pairwise) { - unlist(.mapply(Combiner, dots = list(tree1Info, tree2Info), NULL)) + # TODO When requriring R4.0, remove match.fun - which is now part of + # .mapply + unlist(.mapply(match.fun(Combiner), + dots = list(tree1Info, tree2Info), NULL)) } else { ret <- outer(tree1Info, tree2Info, Combiner) if (inherits(unnormalized, "dist")) ret[lower.tri(ret)] else ret