compute_mrca_map: Compute MRCA node mapping for each taxonomic group

View source: R/compute-mrca.R

compute_mrca_mapR Documentation

Compute MRCA node mapping for each taxonomic group

Description

Compute MRCA node mapping for each taxonomic group

Usage

compute_mrca_map(tree, group_vec, check_monophyly = TRUE, strict = FALSE)

Arguments

tree

phylo object

group_vec

Named vector (names = tip labels, values = group names, NA = ungrouped)

check_monophyly

Logical. If TRUE (default), check if each group is monophyletic before adding to collapse plan. Non-monophyletic groups will be skipped with a warning.

strict

Logical. If TRUE, non-monophyletic groups cause an error instead of a warning. Default: FALSE.

Value

Named list: each element is list(node = integer, tip_count = integer)


Rclade documentation built on Sept. 26, 2026, 5:07 p.m.