Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

orderMappedEdge

Order the columns of mapped.edge to match across trees


Description

This function takes a modified object of class "multiPhylo" with a mapped discrete character (e.g., see read.simmap and sorts the columns of each tree$mapped.edge to have the same state ordering. This is handy if we want to, for instance, run brownie.lite on a set of mapped trees, and then average the fitted parameter values across trees. The function also works for a single tree.

Usage

orderMappedEdge(trees, ordering=NULL)

Arguments

trees

object of class "phylo" or "multiPhylo".

ordering

ordering for the columns of $mapped.edge. If NULL, then an alphabetical order is assumed. Options are "alphabetical", "numerical", or any specific ordering of the mapped traits (e.g., c("A","B","C").

Value

A modified object of class "phylo" or "multiPhylo".

Author(s)

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.


phytools

Phylogenetic Tools for Comparative Biology (and Other Things)

v0.7-70
GPL (>= 2)
Authors
Liam J. Revell
Initial release
2020-9-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.