ladder: Ladderize objects with phylogenetic trees and edgewise data

View source: R/mis_covenient.methods.R

ladderR Documentation

Ladderize objects with phylogenetic trees and edgewise data

Description

This is a generic that extends the ladderize() function from ape to objects of class evorates and evorates_fit. Use it to make tree plots prettier.

Usage

ladder(phy, ...)

Arguments

phy

An object of class evorates, evorates_fit, or phylo.

...

Optional arguments including right and try.all.elements. When right is TRUE, smaller clades are generally sorted to the right/bottom of the phylogeny, and vice versa when right is FALSE (TRUE by default). try.all.elements only works with evorates objects, and works assuming any vector in the object with the same number of elements as there are edges in the phylogeny corresponds to edgewise data, thereby sorting it (TRUE by default). This will additionally sort the post.probs element present in most evorates objects coerced from evorates_fit objects, but may cause unpredictable results in cases when users manually customize an evorates objects.

Value

An object of the same class as phy, with reordered phylogeny and edgewise data.

See Also

ladderize


bstaggmartin/backwards-BM-simulator documentation built on June 3, 2024, 5:51 p.m.