rescale.simmap | R Documentation |
"simmap"
Scales a tree with a mapped discrete character ("simmap"
object), or a set of such trees, to an arbitrary total height, preserving the relative time spent in each state along each edge.
## S3 method for class 'simmap'
rescale(x, model="depth", ...)
## S3 method for class 'multiSimmap'
rescale(x, model="depth", ...)
rescaleSimmap(tree, ...)
x |
object of class |
model |
model to use to rescale the tree. Currently the only option is |
... |
parameter of the model to use in rescaling. Currently the only parameter is |
tree |
for |
Replaces rescaleTree
(now rescale.phylo
) in the geiger package for the "simmap"
object class. rescaleSimmap
is now a redundant alias for the method rescale.simmap
.
An object of class "simmap"
or "multiSimmap"
.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
make.simmap
, read.simmap
## load anoletree
data(anoletree)
## rescale to have total depth of 50
rescaled_anoletree<-rescale(anoletree,depth=50)
## plot rescaled tree
plot(rescaled_anoletree,ftype="i",fsize=0.6,
mar=c(5.1,1.1,1.1,1.1))
axis(1,at=seq(0,50,by=10))
par(mar=c(5.1,4.1,4.1,2.1)) ## reset margin to default
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.