WriteDendrogram {DECIPHER} | R Documentation |
Writes a dendrogram object to a file in Newick (also known as New Hampshire) parenthetic format.
WriteDendrogram(x, file = "", quoteLabels = TRUE, convertBlanks = !quoteLabels, internalLabels = TRUE, digits = 10, append = FALSE)
x |
An object of class |
file |
A connection or a character string naming the file path where the tree should be exported. If "" (the default), the tree is printed to the standard output connection, the console unless redirected by sink. |
quoteLabels |
Logical specifying whether to place leaf labels in double quotes. |
convertBlanks |
Logical specifying whether to convert spaces in leaf labels to underscores. |
internalLabels |
Logical indicating whether to write any “edgetext” preceding a node as an internal node label. |
digits |
The maximum number of digits to print for edge lengths. |
append |
Logical indicating whether to append to an existing |
WriteDendrogram
will write a dendrogram object to a file
in standard Newick format. Note that special characters (commas, square brackets, colons, semi-colons, and parentheses) present in leaf labels will likely cause a broken Newick file unless quoteLabels
is TRUE
(the default).
NULL
.
Erik Wright eswright@pitt.edu
dists <- matrix(c(0, 10, 20, 10, 0, 5, 20, 5, 0), nrow=3, dimnames=list(c("dog", "elephant", "horse"))) dend <- IdClusters(dists, method="NJ", type="dendrogram") WriteDendrogram(dend)