Description Usage Arguments References See Also Examples
This function exports a dendrogram object as a Newick/New Hampshire text string.
1 |
x |
an object of class |
file |
a character string naming a file or connection to write the
output to. If no file path is specified or |
append |
logical indicating whether the output should be
appended to the file. If |
edges |
logical indicating whether edge weights should be included in the output string. |
... |
further arguments to be passed to |
Felsenstein J (1986) The Newick tree format. http://evolution.genetics.washington.edu/phylip/newicktree.html
Olsen G (1990) Interpretation of the "Newick's 8:45" tree format standard. http://evolution.genetics.washington.edu/phylip/newick_doc.html
read.dendrogram
to parse a "dendrogram"
object from a text file.
The write.tree
function in the ape
package performs a similar operation for "phylo"
and "multiPhylo"
objects.
1 2 3 | newick <- "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);"
x <- read.dendrogram(text = newick)
write.dendrogram(x, edges = TRUE)
|
[1] "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.