Learn R Programming

phytools (version 2.4-4)

ladderize.simmap: Ladderize a tree with a mapped discrete character

Description

Ladderizes an object of class "simmap".

Usage

ladderize.simmap(tree, right=TRUE)

Value

A ladderized object of class "simmap".

Arguments

tree

an object of class "simmap".

right

a logical specifying how the tree should be ladderized.

Author

Liam Revell liam.revell@umb.edu

Details

This function 'ladderizes' an object of class "simmap" with a mapped discrete character.

For more information see ladderize.

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, ladderize

Examples

Run this code
## load "simmap" object
data(anoletree)

## ladderize object
anoletree_ladderized<-ladderize.simmap(anoletree)

## plot unladderized & ladderized
par(mfrow=c(2,1))
plot(anoletree,ftype="off",direction="upwards",
    mar=c(1.1,2.1,2.1,1.1))
mtext("a) unladderized tree",adj=0)
plot(anoletree_ladderized,ftype="off",
    direction="upwards",mar=c(1.1,2.1,2.1,1.1))
mtext("b) ladderized tree",adj=0)

## reset par to default
par(mfrow=c(1,1),mar=c(5.1,4.1,4.1,2.1))

Run the code above in your browser using DataLab