# Create, Modify and Analyse Phylogenetic Trees

## Documentation for package ‘TreeTools’ version 2.3.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G H I J K L M N P R S T U V W X Y Z misc

## -- A --

AddTip | Add a tip to a phylogenetic tree
AddTipEverywhere | Add a tip to a phylogenetic tree
AddUnconstrained | Force a tree to match a constraint
AllAncestors | List ancestors
AllTipLabels | Extract tip labels
AllTipLabels.list | Extract tip labels
AllTipLabels.matrix | Extract tip labels
AllTipLabels.multiPhylo | Extract tip labels
AllTipLabels.phylo | Extract tip labels
AllTipLabels.Splits | Extract tip labels
AllTipLabels.TreeNumber | Extract tip labels
ApeTime | Read modification time from "ape" Nexus file
ArtEx | Artificial Extinction
ArtificialExtinction | Artificial Extinction
ArtificialExtinction.matrix | Artificial Extinction
ArtificialExtinction.phyDat | Artificial Extinction
as.ClusterTable | Convert phylogenetic tree to 'ClusterTable'
as.ClusterTable.list | Convert phylogenetic tree to 'ClusterTable'
as.ClusterTable.multiPhylo | Convert phylogenetic tree to 'ClusterTable'
as.ClusterTable.phylo | Convert phylogenetic tree to 'ClusterTable'
as.logical.Splits | Convert object to 'Splits'
as.matrix.ClusterTable | S3 methods for 'ClusterTable' objects
as.MixedBase | Unique integer indices for bifurcating tree topologies
as.MixedBase.integer64 | Unique integer indices for bifurcating tree topologies
as.MixedBase.MixedBase | Unique integer indices for bifurcating tree topologies
as.MixedBase.multiPhylo | Unique integer indices for bifurcating tree topologies
as.MixedBase.numeric | Unique integer indices for bifurcating tree topologies
as.MixedBase.phylo | Unique integer indices for bifurcating tree topologies
as.MixedBase.TreeNumber | Unique integer indices for bifurcating tree topologies
as.multiPhylo | Convert object to 'multiPhylo' class
as.multiPhylo.list | Convert object to 'multiPhylo' class
as.multiPhylo.phyDat | Convert object to 'multiPhylo' class
as.multiPhylo.phylo | Convert object to 'multiPhylo' class
as.multiPhylo.Splits | Convert object to 'multiPhylo' class
as.Newick | Write a phylogenetic tree in Newick format
as.Newick.list | Write a phylogenetic tree in Newick format
as.Newick.multiPhylo | Write a phylogenetic tree in Newick format
as.Newick.phylo | Write a phylogenetic tree in Newick format
as.phylo.MixedBase | Unique integer indices for bifurcating tree topologies
as.phylo.numeric | Unique integer indices for bifurcating tree topologies
as.phylo.TreeNumber | Unique integer indices for bifurcating tree topologies
as.Splits | Convert object to 'Splits'
as.Splits.character | Convert object to 'Splits'
as.Splits.integer | Convert object to 'Splits'
as.Splits.list | Convert object to 'Splits'
as.Splits.logical | Convert object to 'Splits'
as.Splits.matrix | Convert object to 'Splits'
as.Splits.multiPhylo | Convert object to 'Splits'
as.Splits.numeric | Convert object to 'Splits'
as.Splits.phylo | Convert object to 'Splits'
as.Splits.Splits | Convert object to 'Splits'
as.TreeNumber | Unique integer indices for bifurcating tree topologies
as.TreeNumber.character | Unique integer indices for bifurcating tree topologies
as.TreeNumber.MixedBase | Unique integer indices for bifurcating tree topologies
as.TreeNumber.multiPhylo | Unique integer indices for bifurcating tree topologies
as.TreeNumber.phylo | Unique integer indices for bifurcating tree topologies
as.TreeNumber.TreeNumber | Unique integer indices for bifurcating tree topologies

## -- B --

BalancedTree | Generate pectinate, balanced or random trees
brewer | Brewer palettes

## -- C --

CharacterInformation | Character information content
Cherries | Count cherries in a tree
Cherries.numeric | Count cherries in a tree
Cherries.phylo | Count cherries in a tree
CladeSizes | Clade sizes
CladisticInfo | Cladistic information content of a tree
CladisticInfo.list | Cladistic information content of a tree
CladisticInfo.multiPhylo | Cladistic information content of a tree
CladisticInfo.phylo | Cladistic information content of a tree
CladisticInfo.Splits | Cladistic information content of a tree
CladisticInformation | Cladistic information content of a tree
ClusterTable | Convert phylogenetic tree to 'ClusterTable'
ClusterTable-methods | S3 methods for 'ClusterTable' objects
CollapseEdge | Collapse nodes on a phylogenetic tree
CollapseNode | Collapse nodes on a phylogenetic tree
CollapseNode.phylo | Collapse nodes on a phylogenetic tree
Consensus | Construct consensus trees
ConsensusWithout | Reduced consensus, omitting specified taxa
ConsensusWithout.list | Reduced consensus, omitting specified taxa
ConsensusWithout.multiPhylo | Reduced consensus, omitting specified taxa
ConsensusWithout.phylo | Reduced consensus, omitting specified taxa
ConstrainedNJ | Constrained neighbour-joining tree

## -- D --

Decompose | Decompose additive (ordered) phylogenetic characters
DescendantEdges | Identify descendant edges
DescendantTips | Identify descendant edges
DoubleFactorial | Double factorial
DoubleFactorial64 | Double factorial
doubleFactorials | Double factorials
DropTip | Drop leaves from tree
DropTip.list | Drop leaves from tree
DropTip.multiPhylo | Drop leaves from tree
DropTip.NULL | Drop leaves from tree
DropTip.phylo | Drop leaves from tree
DropTip.Splits | Drop leaves from tree
DropTipPhylo | Drop leaves from tree

## -- E --

EdgeAncestry | Ancestors of an edge
EdgeDistances | Distance between edges
EdgeRatio | Ratio of external:internal edge length
EdgeRatio.phylo | Ratio of external:internal edge length
edge_to_splits | Efficiently convert edge matrix to splits
EndSentence | Add full stop to end of a sentence

## -- F --

FirstMatchingSplit | Split matching

## -- G --

GenerateTree | Generate pectinate, balanced or random trees

## -- H --

Hamming | Hamming distance between taxa in a phylogenetic dataset

## -- I --

IC1Spr | Number of trees one SPR step away
ImposeConstraint | Force a tree to match a constraint
is.TreeNumber | Is an object a 'TreeNumber' object?

## -- J --

J1Index | Robust universal tree balance index
JQIndex | Robust universal tree balance index

## -- K --

KeepTip | Drop leaves from tree
KeepTip.list | Drop leaves from tree
KeepTip.multiPhylo | Drop leaves from tree
KeepTip.NULL | Drop leaves from tree
KeepTip.phylo | Drop leaves from tree
KeepTip.Splits | Drop leaves from tree
KeepTipPostorder | Drop leaves from tree
KeepTipPreorder | Drop leaves from tree
KeptPaths | Paths present in reduced tree
KeptPaths.data.frame | Paths present in reduced tree
KeptPaths.matrix | Paths present in reduced tree
KeptVerts | Identify vertices retained when leaves are dropped
KeptVerts.numeric | Identify vertices retained when leaves are dropped
KeptVerts.phylo | Identify vertices retained when leaves are dropped

## -- L --

LabelSplits | Label splits
LeafLabelInterchange | Leaf label interchange
ListAncestors | List ancestors
LnDoubleFactorial | Double factorial
LnDoubleFactorial.int | Double factorial
LnRooted | Number of trees
LnRooted.int | Number of trees
LnSplitMatchProbability | Probability of matching this well
LnTreesMatchingSplit | Number of trees matching a bipartition split
LnTreesMatchingTree | Number of trees containing a tree
LnUnrooted | Number of trees
LnUnrooted.int | Number of trees
LnUnrootedMult | Number of trees
LnUnrootedSplits | Number of trees
LnUnrootedTreesMatchingSplit | Number of trees consistent with split
Lobo.data | Data from Zhang et al. 2016
Lobo.phy | Data from Zhang et al. 2016
Log2DoubleFactorial | Double factorial
Log2Rooted | Number of trees
Log2Rooted.int | Number of trees
Log2TreesMatchingSplit | Number of trees matching a bipartition split
Log2TreesMatchingTree | Number of trees containing a tree
Log2Unrooted | Number of trees
Log2Unrooted.int | Number of trees
Log2UnrootedMult | Number of trees
Log2UnrootedSplits | Number of trees
Log2UnrootedTreesMatchingSplit | Number of trees consistent with split
LogDoubleFactorial | Double factorial
LogDoubleFactorial.int | Double factorial
logDoubleFactorials | Natural logarithms of double factorials
LongBranch | Identify taxa with long branches

## -- M --

MakeTreeBinary | Generate binary tree by collapsing polytomies
MarkMissing | Reduced consensus, omitting specified taxa
match | Split matching
match-method | Split matching
match-method | Tree matching
MatchEdges | Match nodes and edges between trees
MatchNodes | Match nodes and edges between trees
MatchStrings | Check for mismatch between character vectors
MatrixToPhyDat | Convert between matrices and 'phyDat' objects
MorphoBankDecode | Decode MorphoBank text
MrBayesTrees | Read posterior tree sample produced by MrBayes
MRCA | Most recent common ancestor
MSTEdges | Minimum spanning tree
MSTLength | Minimum spanning tree
MultiSplitInformation | Phylogenetic information content of splitting leaves into two partitions

## -- N --

N1Spr | Number of trees one SPR step away
NDescendants | Count descendants for each node in a tree
NewickTree | Write Newick Tree
NJTree | Generate a neighbour joining tree
NodeDepth | Distance of each node from tree exterior
NodeNumbers | Numeric index of each node in a tree 'NodeNumbers()' returns a sequence corresponding to the nodes in a tree
NodeOrder | Number of edges incident to each node in a tree
NPartitionPairs | Distributions of tips consistent with a partition pair
NPartitions | Number of distinct splits
NRooted | Number of trees
NRooted64 | Number of trees
nRootedShapes | Number of rooted / unrooted tree shapes
NSplits | Number of distinct splits
NSplits.character | Number of distinct splits
NSplits.ClusterTable | Number of distinct splits
NSplits.list | Number of distinct splits
NSplits.multiPhylo | Number of distinct splits
NSplits.NULL | Number of distinct splits
NSplits.numeric | Number of distinct splits
NSplits.phylo | Number of distinct splits
NSplits.Splits | Number of distinct splits
NTip | Number of leaves in a phylogenetic tree
NTip.default | Number of leaves in a phylogenetic tree
NTip.list | Number of leaves in a phylogenetic tree
NTip.matrix | Number of leaves in a phylogenetic tree
NTip.multiPhylo | Number of leaves in a phylogenetic tree
NTip.phyDat | Number of leaves in a phylogenetic tree
NTip.phylo | Number of leaves in a phylogenetic tree
NTip.Splits | Number of leaves in a phylogenetic tree
NUnrooted | Number of trees
NUnrooted64 | Number of trees
NUnrootedMult | Number of trees
nUnrootedShapes | Number of rooted / unrooted tree shapes
NUnrootedSplits | Number of trees

## -- P --

PairwiseDistances | Distances between each pair of trees
PathLengths | Calculate length of paths between each pair of vertices within tree
PectinateTree | Generate pectinate, balanced or random trees
PhyDat | Read phylogenetic characters from file
PhyDatToMatrix | Convert between matrices and 'phyDat' objects
PhyDatToString | Convert between strings and 'phyDat' objects
PhydatToString | Convert between strings and 'phyDat' objects
PhyToString | Convert between strings and 'phyDat' objects
PolarizeSplits | Polarize splits on a single taxon
print.ClusterTable | S3 methods for 'ClusterTable' objects
print.TreeNumber | Print 'TreeNumber' object

## -- R --

RandomTree | Generate pectinate, balanced or random trees
ReadAsPhyDat | Read phylogenetic characters from file
ReadCharacters | Read phylogenetic characters from file
ReadMrBayes | Read posterior tree sample produced by MrBayes
ReadMrBayesTrees | Read posterior tree sample produced by MrBayes
ReadNotes | Read phylogenetic characters from file
ReadTNTAsPhyDat | Read phylogenetic characters from file
ReadTntAsPhyDat | Read phylogenetic characters from file
ReadTNTCharacters | Read phylogenetic characters from file
ReadTntCharacters | Read phylogenetic characters from file
ReadTntTree | Parse TNT Tree
Renumber | Renumber a tree's nodes and tips
RenumberTips | Renumber a tree's tips
RenumberTips.list | Renumber a tree's tips
RenumberTips.multiPhylo | Renumber a tree's tips
RenumberTips.NULL | Renumber a tree's tips
RenumberTips.phylo | Renumber a tree's tips
RenumberTips.Splits | Renumber a tree's tips
replicate64 | Apply a function that returns 64-bit integers over a list or vector
Reweight | Reweight phylogenetic characters
RightmostCharacter | Rightmost character of string
RoguePlot | Visualize position of rogue taxa
RootNode | Which node is a tree's root?
RootNodeDist | "Stemwardness" of a leaf
RootNodeDistance | "Stemwardness" of a leaf
RootNodeDistance.character | "Stemwardness" of a leaf
RootNodeDistance.numeric | "Stemwardness" of a leaf
RootOnNode | Root or unroot a phylogenetic tree
RootTree | Root or unroot a phylogenetic tree

## -- S --

SampleOne | Select element at random
sapply64 | Apply a function that returns 64-bit integers over a list or vector
SingleTaxonTree | Generate trivial trees
SisterSize | "Stemwardness" of a leaf
SisterSize.character | "Stemwardness" of a leaf
SisterSize.numeric | "Stemwardness" of a leaf
sort.multiPhylo | Sort a list of phylogenetic trees
SortTree | Sort tree
SortTree.list | Sort tree
SortTree.multiPhylo | Sort tree
SortTree.phylo | Sort tree
SplitConflicts | Identify consistent / conflicting splits
SplitConsistent | Identify consistent / conflicting splits
SplitFrequency | Frequency of splits
SplitImbalance | Tips contained within splits
SplitImbalance.phylo | Tips contained within splits
SplitImbalance.Splits | Tips contained within splits
SplitInformation | Phylogenetic information content of splitting leaves into two partitions
SplitInformation.numeric | Phylogenetic information content of splitting leaves into two partitions
SplitInformation.phylo | Phylogenetic information content of splitting leaves into two partitions
SplitInformation.Splits | Phylogenetic information content of splitting leaves into two partitions
SplitMatchProbability | Probability of matching this well
Splits | Convert object to 'Splits'
SplitsInBinaryTree | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.default | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.list | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.multiPhylo | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.NULL | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.numeric | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.phylo | Maximum splits in an _n_-leaf tree
SplitsInBinaryTree.Splits | Maximum splits in an _n_-leaf tree
StarTree | Generate pectinate, balanced or random trees
Stemminess | Relative length of internal branches
Stemwardness | "Stemwardness" of a leaf
StringToPhyDat | Convert between strings and 'phyDat' objects
StringToPhydat | Convert between strings and 'phyDat' objects
Subsplit | Subset of a split on fewer leaves
Subtree | Extract a subtree
summary.ClusterTable | S3 methods for 'ClusterTable' objects
SupportColor | Colour for node support value
SupportColour | Colour for node support value

## -- T --

TCIContext | Total Cophenetic Index
TCIContext.numeric | Total Cophenetic Index
TipLabels | Extract tip labels
TipLabels.character | Extract tip labels
TipLabels.default | Extract tip labels
TipLabels.list | Extract tip labels
TipLabels.logical | Extract tip labels
TipLabels.matrix | Extract tip labels
TipLabels.MixedBase | Extract tip labels
TipLabels.multiPhylo | Extract tip labels
TipLabels.numeric | Extract tip labels
TipLabels.phyDat | Extract tip labels
TipLabels.phylo | Extract tip labels
TipLabels.Splits | Extract tip labels
TipLabels.TreeNumber | Extract tip labels
TipsInSplits | Tips contained within splits
TipsInSplits.phylo | Tips contained within splits
TipsInSplits.Splits | Tips contained within splits
TipTimedTree | Display time-calibrated tree using tip information only
TNTText2Tree | Parse TNT Tree
TntText2Tree | Parse TNT Tree
TopologyOnly | Remove metadata from trees
TotalCopheneticIndex | Total Cophenetic Index
TreeIsRooted | Is tree rooted?
Treeness | Relative length of internal branches
TreeNumber | Unique integer indices for bifurcating tree topologies
TreesMatchingSplit | Number of trees matching a bipartition split
TreesMatchingTree | Number of trees containing a tree
TrivialSplits | Identify and remove trivial splits
TrivialTree | Generate trivial trees

## -- U --

Unquote | Remove quotation marks from a string
UnrootedTreesMatchingSplit | Number of trees consistent with split
UnrootTree | Root or unroot a phylogenetic tree
UnshiftTree | Add tree to start of list

## -- V --

vapply64 | Apply a function that returns 64-bit integers over a list or vector

## -- W --

WithoutTrivialSplits | Identify and remove trivial splits
WriteTntCharacters | Write morphological character matrix to TNT file
WriteTntCharacters.matrix | Write morphological character matrix to TNT file
WriteTntCharacters.phyDat | Write morphological character matrix to TNT file

## -- X --

xor | Exclusive OR operation
xor-method | Exclusive OR operation

## -- Y --

YuleTree | Generate pectinate, balanced or random trees

## -- Z --

ZeroTaxonTree | Generate trivial trees

## -- misc --

%in%-method | Split matching
%in%-method | Tree matching
<.MixedBase | Sort a list of phylogenetic trees
<.phylo | Sort a list of phylogenetic trees
==.MixedBase | Sort a list of phylogenetic trees
==.phylo | Sort a list of phylogenetic trees
>.MixedBase | Sort a list of phylogenetic trees
>.phylo | Sort a list of phylogenetic trees