R/method-MRCA.R

Defines functions MRCA.treedata MRCA.phylo

#' @method MRCA phylo
#' @export
MRCA.phylo <- function(.data, .node1, .node2 = NULL, ...) {
    MRCA(as_tibble(.data), .node1, .node2, ...)[["node"]]
}

#' @method MRCA treedata
#' @export
MRCA.treedata <- function(.data, .node1, .node2 = NULL, ...) {
    MRCA.phylo(as.phylo(.data), .node1, .node2, ...)
}

Try the tidytree package in your browser

Any scripts or data that you put into this service are public.

tidytree documentation built on Jan. 8, 2026, 9:08 a.m.