View source: R/helper_functions.R
| UnshiftTree | R Documentation |
UnshiftTree() adds a phylogenetic tree to the start of a list of trees.
This is useful where the class of a list of trees is unknown, or where
names of trees should be retained.
UnshiftTree(add, treeList)
add |
Tree to add to the list, of class |
treeList |
A list of trees, of class |
Caution: adding a tree to a multiPhylo object whose own attributes apply
to all trees, for example trees read from a Nexus file, causes data to be
lost.
UnshiftTree() returns a list of class list or multiPhylo
(following the original class of treeList), whose first element is the
tree specified as 'add.
Martin R. Smith (martin.smith@durham.ac.uk)
c() joins a tree or series of trees to a multiPhylo object, but loses
names and does not handle lists of trees.
Other utility functions:
ClusterTable,
ClusterTable-methods,
Hamming(),
MSTEdges(),
SampleOne(),
TipTimedTree(),
as.multiPhylo(),
match,phylo,phylo-method,
sapply64(),
sort.multiPhylo()
forest <- as.phylo(0:5, 6)
tree <- BalancedTree(6)
UnshiftTree(tree, forest)
UnshiftTree(tree, tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.