Learn R Programming

phytools (version 0.3-72.1)

mergeMappedStates: Merge two or more mapped states into one state

Description

This function merges two or mapped states on the tree to get one new state. For instance, one could merge the states "C", "G", and "T" to get the state "not-A".

Usage

mergeMappedStates(tree, old.states, new.state)

Arguments

tree
a modified object of class "phylo" or "multiPhylo" with a mapped discrete character.
old.states
states to merge.
new.state
name for new state.

Value

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

See Also

make.simmap, read.simmap