| toMoment | R Documentation |
Converts a phylogenetic tree from a Newick character string or an ape
matching matrix into a moment L-matrix object.
toMoment(inputobject, tip.label = NULL)
inputobject |
A tree structure represented as a Newick format character
string, or a |
tip.label |
A character vector specifying rearranged labels for the
tips. If provided, these must be the original tip labels. Defaults to |
The returned L-matrix class object consists of 5 internal components:
L: The L-matrix represented in full square form.
L.ut: The L-matrix represented in upper-triangular form.
Newick: The Newick string representation of the tree structure.
tip.label: A character vector holding the labels of the tips.
tip.label.n: An integer specifying the total number of tips.
A moment L-matrix object corresponding to the input phylogenetic tree object.
Kem Phillips kemphillips@comcast.net
Phillips2010symmoments
Felsenstein, J. (1990). The Newick tree format.
http://evolution.genetics.washington.edu/phylip/newicktree.html
\insertRefDiaconis1998symmoments
toNewick, toMatching
# Create a Newick character string
exam.Newick <- "(((a,b),c),d);"
# Convert to a moment L-matrix
exam.moment <- toMoment(exam.Newick)
# Convert to a matching object
exam.matching <- toMatching(exam.moment)
# Convert back to a moment object
backto.moment <- toMoment(exam.matching)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.