Learn R Programming

⚠️There's a newer version (2.5-2) of this package.Take me there.

phytools (version 0.4-05)

Phylogenetic Tools for comparative biology (and other things)

Description

phytools provides various functions for phylogenetic analysis, mostly relevant to comparative biology.

Copy Link

Version

Install

install.packages('phytools')

Monthly Downloads

12,223

Version

0.4-05

License

GPL (>= 2)

Maintainer

Liam Revell

Last Published

May 5th, 2014

Functions in phytools (0.4-05)

bind.tip

Attaches a new tip to a tree
expm

Matrix exponential
add.everywhere

Add tip to all edges in a tree
add.random

Add tips at random to the tree
add.simmap.legend

Add legend to stochastically mapped tree
collapse.to.star

Collapse a subtree to a star phylogeny
export.as.xml

Export trees & data in XML format
genSeq

Simulate a DNA alignment on the tree under a model
add.color.bar

Add color bar to a plot
anc.trend

Ancestral character estimation with a trend
add.species.to.genus

Add species to genus on a phylogeny
ltt

Creates lineage-through-time plot (including extinct lineages)
ltt95

Creates a (1-$\alpha$)-percent CI for a set of LTTs
di2multi.simmap

Collapse branches of zero length to polytomy in stochastic map style tree
brownie.lite

Likelihood test for rate variation in a continuous trait
mergeMappedStates

Merge two or more mapped states into one state
applyBranchLengths

Applies the branch lengths of a reference tree to a target
describe.simmap

Summarizes a stochastic mapped tree or set of trees
fastBM

Fast Brownian simulation
multi.mantel

Multiple matrix regression (partial Mantel test)
ls.tree

Least squares branch lengths for a given tree
phyl.pairedttest

Phylogenetic paired t-test
matchNodes

Matches nodes between two trees
map.overlap

Proportional overlap between two mapped character histories on a tree
evol.vcv

Likelihood test for variation in the evolutionary VCV matrix
exhaustiveMP

Exhaustive and branch & bound MP optimization
phyl.vcv

Compute evolutionary VCV matrix for a tree & dataset
phyl.resid

Phylogenetic size-correction via GLS regression
drop.clade

Drop a clade from a tree
brownieREML

REML version of brownie.lite
fancyTree

Plots special types of phylogenetic trees
plot.backbonePhylo

Plots backbone tree with triangles as clades
plotTree

Plots rooted phylogenetic tree
fitDiversityModel

Fit diversity-dependent phenotypic evolution model
lambda.transform

Lambda transformation of matrix
rotateNodes

Rotates a node or set of nodes in a phylogenetic tree
branching.diffusion

Animation of branching random diffusion
minRotate

Rotates all nodes of the tree to minimize the difference in order with a vector
phylANOVA

Phylogenetic ANOVA and post-hoc tests
plotBranchbyTrait

Plot branch colors by a quantitative trait or value
mrp.supertree

Matrix representation parsimony supertree estimation
minSplit

Finding the minimum (median) split in the posterior sample
phytools-package

phytools: Phylogenetic Tools for comparative biology (and other things)
ave.rates

Average the posterior rates
paintSubTree

Paint sub-trees with a discrete character
phylomorphospace3d

Creates tree-dimensional phylomorphospace plot
orderMappedEdge

Order the columns of mapped.edge to match across trees
bmPlot

Simulates and visualizes discrete-time Brownian evolution on a phylogeny
nodeHeights

Compute the heights above the root of each node
evolvcv.lite

Likelihood test for a shift in the evolutionary correlation between traits
anoletree

Phylogeny of Greater Antillean anole ecomorph species with mapped discrete character
drop.tip.simmap

Drop tips or extract clade from tree with mapped discrete character
phylo.to.map

Plot tree with tips linked to geographic coordinates
multiRF

Computes Robinson-Foulds distance between a set of trees
fastMRCA

Get the MRCA (or height above the root of the MRCA) of a pair of tip taxa
countSimmap

Counts the number of character changes on a SIMMAP style tree or set of trees
fitBayes

Evolutionary model fitting with intraspecific variability using Bayesian MCMC
anc.ML

Ancestral character estimation using likelihood
read.newick

Robust Newick style tree reader
getCladesofSize

Get all subtrees larger than or equal to a specified size
reorder.backbonePhylo

Reorders a backbone phylogeny
repPhylo

Replicate a tree into a list of trees
getDescendants

Get descendant node numbers
findMRCA

Get the MRCA of a set of taxa
sampleFrom

Sample from a set of distributions
sim.corrs

Multivariate Brownian simulation with multiple correlations and rates
splitTree

Split tree at a point
map.to.singleton

Converts a mapped tree to a tree with singleton nodes
make.era.map

Create "era" map on a phylogenetic tree
sim.rates

Brownian simulation with multiple evolutionary rates
rerootingMethod

Get marginal ancestral state reconstructions by re-rooting
multiC

Returns a list with phylogenetic VCV matrix for each mapped state
allFurcTrees

Generate all bi- and multifurcating unrooted trees
skewers

Matrix comparison using the method of random skewers
read.simmap

Read SIMMAP style trees from file
reorderSimmap

Reorder edges of a simmap tree
make.simmap

Simulate stochastic character maps on a phylogenetic tree or trees
cladelabels

Add labels to subtrees of a plotted phylogeny
getExtant

Returns a list of the extant or extinct lineages in a tree containing non-contemporaneous tips
ancThresh

Ancestral character estimation under the threshold model using Bayesian MCMC
rescaleSimmap

Rescale SIMMAP style tree
getStates

Get the states at nodes or tips from a mapped tree
midpoint.root

Midpoint root a phylogeny
phenogram

Plot phenogram (traitgram)
optim.phylo.ls

Phylogeny inference using the least squares method
fastAnc

Fast estimation of ML ancestral states
phylomorphospace

Creates phylomorphospace plot
sim.ratebystate

Conduct simulation of state dependent rate variation
paste.tree

Paste two trees together
phylo.toBackbone

Converts tree to backbone or vice versa
roundPhylogram

Plot a round phylogram
phyl.cca

Phylogenetic canonical correlation analysis
plotSimmap

Plot stochastic character mapped tree
roundBranches

Rounds the branch lengths of a tree
phyl.RMA

Phylogenetic reduced major axis (RMA) regression
phylosig

Compute phylogenetic signal with two methods
pbtree

Simulate pure-birth or birth-death stochastic tree or trees
rateshift

Find the temporal position of one or more rate shifts
posterior.evolrate

Analysis of the posterior sample from evol.rate.mcmc
rstate

Pick a random state according to a vector of probabilities
plotThresh

Tree plotting with posterior probabilities of ancestral states from the threshold model
ratebystate

Method for investigating the rate of one trait as a function of the state of another
splitplotTree

Plots a phylogeny in two columns
reroot

Re-root a tree along an edge
to.matrix

Convert a character vector to a binary matrix
vcvPhylo

Calculates cophenetic (i.e., phylogenetic VCV) matrix
treeSlice

Slices the tree at a particular point and returns all subtrees
sim.history

Simulate stochastic character history under some model
writeAncestors

Write a tree to file with ancestral states and (optionally) CIs at nodes
threshBayes

Threshold model using Bayesian MCMC
starTree

Create star phylogeny
writeNexus

Write a tree to file in Nexus format
strahlerNumber

Computes Strahler number for trees and nodes
phyloDesign

Compute design matrix for least squares analyses
anc.Bayes

Bayesian ancestral character estimation
densityMap

Plot posterior density of stochastic mapping on a tree
drop.leaves

Drop all the leaves (tips) from a tree
contMap

Map continuous trait evolution on the tree
evol.rate.mcmc

Bayesian MCMC method for identifying exceptional phenotypic diversification in a phylogeny
estDiversity

Estimate diversity at each node of the tree
likMlambda

Likelihood for joint lambda
write.simmap

Write a stochastic character mapped tree to file
threshState

Computes value for a threshold character from a liability and thresholds
threshDIC

Deviance Information Criterion from the threshold model
getSisters

Get the sister node number, label, or set of nodes for a node or tip
gammatest

Gamma test of Pybus & Harvey (2000)
phyl.pca

Phylogenetic principal components analysis
pgls.Ives

Phylogenetic regression with intraspecific sampling error
print.backbonePhylo

Print method for backbone phylogeny
untangle

Attempts to untangle crossing branches for plotting