tree_consensus: Compute tree consensus for multiple trees

View source: R/basics_utilities.R

tree_consensusR Documentation

Compute tree consensus for multiple trees

Description

this function returns a consensus tree of the class phylo. I can be used to be saved or plot with diferent functions and pakcages

Usage

tree_consensus(trees, type, p)

Arguments

trees

an object of the class multiPhylo

type

a type of consensus. Default is "mcc" (Maximum Credibility Tree), but majority rule ("majority") or "strict" rules are also avaliable. In case of majority rule, the user also might use the param "p".

p

the proportion of concordance for some specific node. Default is 0.5, but users might change that between 0 and 1. If 1 is seted the algoritms behaves as strict rule.

Details

this function is an wrap of ape and phangorn packages

Examples

df <- simulate_data()
S <- renkonen(df, 100)
trees <- upgma(S)
mcc_tree <- tree_consensus(trees, "mcc")

wilsonfrantine/R4eco documentation built on Jan. 30, 2024, 4:55 p.m.