writeDist | R Documentation |
readDist
, writeDist
and write.nexus.dist
are useful to
exchange distance matrices with other phylogenetic programs.
writeDist(x, file = "", format = "phylip", ...)
write.nexus.dist(x, file = "", append = FALSE, upper = FALSE,
diag = TRUE, digits = getOption("digits"), taxa = !append)
readDist(file, format = "phylip")
read.nexus.dist(file)
## S3 method for class 'dist'
unique(x, incomparables, ...)
x |
A |
file |
A file name. |
format |
file format, default is "phylip", only other option so far is "nexus". |
... |
Further arguments passed to or from other methods. |
append |
logical. If TRUE the nexus blocks will be added to a file. |
upper |
logical value indicating whether the upper triangle of the distance matrix should be printed. |
diag |
logical value indicating whether the diagonal of the distance matrix should be printed. |
digits |
passed to format inside of |
taxa |
logical. If TRUE a taxa block is added. |
incomparables |
Not used so far. |
an object of class dist
Klaus Schliep klaus.schliep@gmail.com
Maddison, D. R., Swofford, D. L. and Maddison, W. P. (1997) NEXUS: an extensible file format for systematic information. Systematic Biology, 46, 590–621.
To compute distance matrices see dist.ml
dist.dna
and dist.p
for pairwise
polymorphism p-distances
data(yeast)
dm <- dist.ml(yeast)
writeDist(dm)
write.nexus.dist(dm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.