| toNewick | R Documentation |
Converts a tree structure represented in a moment format back into a Newick format string.
toNewick(L, type = NULL, tip.label = NULL)
L |
The input tree structure. This can be an |
type |
A character string, either |
tip.label |
A character vector containing custom labels for the tips. If |
An L-matrix object is a list containing the following 5 components:
L: The L-matrix in full square form.
L.ut: The L-matrix in reduced upper-triangular form.
Newick: The Newick string representation of the tree structure.
tip.label: A character vector of the tip labels.
tip.label.n: An integer specifying the total number of tips.
A character string representing the Newick format of the phylogenetic tree corresponding
to the input. The output list is assigned the class 'L-Newick', which contains 5 components
including the tree string.
Kem Phillips kemphillips@comcast.net
Phillips2010symmoments
Felsenstein, J. (1990). The Newick tree format.
http://evolution.genetics.washington.edu/phylip/newicktree.html
\insertRefDiaconis1998symmoments
toMoment, toMatching
# Create a Newick character string
exam.Newick <- "(((a,b),c),d);"
# Convert to a moment L-matrix
exam.moment <- toMoment(exam.Newick)
# Convert back to Newick format
backto.Newick <- toNewick(exam.moment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.