R/method-MRCA.R

Defines functions MRCA.treedata MRCA.phylo

##' @importFrom tidytree MRCA
##' @importFrom tidytree as_tibble
##' @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 treeio package in your browser

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

treeio documentation built on Nov. 21, 2020, 2:01 a.m.