mergeMappedStates: Merge two or more mapped states into one state

View source: R/utilities.R

mergeMappedStatesR Documentation

Merge two or more mapped states into one state

Description

Merges two or mapped states on the tree to get one new state.

Usage

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

Arguments

tree

an object of class "simmap" or "multiSimmap" containing one or more phylogenetic trees with a mapped discrete character.

old.states

states to merge.

new.state

name for new state.

Details

mergeMappedStates can be used to merge two or more mapped states into a single, new state. For instance, one could merge the states "C", "G", and "T" and define the new the state "not-A".

Value

An object of class "simmap" or "multiSimmap".

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

See Also

make.simmap, read.simmap


liamrevell/phytools documentation built on March 4, 2024, 3:27 a.m.