diff --git a/R/VisualizeMatching.R b/R/VisualizeMatching.R index c551920a4..59eebfdd3 100644 --- a/R/VisualizeMatching.R +++ b/R/VisualizeMatching.R @@ -32,10 +32,9 @@ #' or `"none"`. #' @param edge.width,edge.color,\dots Additional parameters to send to `Plot()`. #' -#' @importFrom ape nodelabels edgelabels plot.phylo -#' @importFrom colorspace qualitative_hcl sequential_hcl -#' @importFrom graphics par -#' @importFrom TreeTools as.Splits +#' @returns `VisualizeMatching()` invisibly returns the matching of splits +#' between `tree1` and `tree2` (i.e. +#' `Func(tree1, tree2, reportMatching = TRUE)`) #' #' @examples #' tree1 <- TreeTools::BalancedTree(6) @@ -45,6 +44,10 @@ #' VisualizeMatching(SharedPhylogeneticInfo, tree1, tree2, matchZeros = FALSE) #' @template MRS #' @encoding UTF-8 +#' @importFrom ape nodelabels edgelabels plot.phylo +#' @importFrom colorspace qualitative_hcl sequential_hcl +#' @importFrom graphics par +#' @importFrom TreeTools as.Splits #' @export VisualizeMatching <- function (Func, tree1, tree2, setPar = TRUE, precision = 3L, Plot = plot.phylo, @@ -208,5 +211,5 @@ VisualizeMatching <- function (Func, tree1, tree2, setPar = TRUE, .LabelUnpaired(splitEdges2, !paired2) # Return: - invisible() + invisible(matching) } diff --git a/man/VisualizeMatching.Rd b/man/VisualizeMatching.Rd index 4fbe12a8f..d3725f101 100644 --- a/man/VisualizeMatching.Rd +++ b/man/VisualizeMatching.Rd @@ -54,6 +54,11 @@ or \code{"none"}.} \item{edge.width, edge.color, \dots}{Additional parameters to send to \code{Plot()}.} } +\value{ +\code{VisualizeMatching()} invisibly returns the matching of splits +between \code{tree1} and \code{tree2} (i.e. +\code{Func(tree1, tree2, reportMatching = TRUE)}) +} \description{ Depict the splits that are matched between two trees using a specified \href{https://ms609.github.io/TreeDist/articles/Generalized-RF.html}{Generalized Robinson–Foulds}