writeDist

0th

Percentile

Writing and reading distances in phylip and nexus format

readDist, writeDist and write.nexus.dist are useful to exchange distance matrices with other phylogenetic programs.

Keywords
cluster
Usage
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 dist unique(x, incomparables, ...)

Arguments
x

A dist object.

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 write.nexus.dist.

taxa

logical. If TRUE a taxa block is added.

incomparables

Not used so far.

Value

an object of class dist

References

Maddison, D. R., Swofford, D. L. and Maddison, W. P. (1997) NEXUS: an extensible file format for systematic information. Systematic Biology, 46, 590--621.

See Also

To compute distance matrices see dist.ml dist.dna and dist.p for pairwise polymorphism p-distances

Aliases
  • writeDist
  • write.nexus.dist
  • readDist
  • read.nexus.dist
  • unique.dist
Examples
# NOT RUN {
data(yeast)
dm <- dist.ml(yeast)
writeDist(dm)
write.nexus.dist(dm)

# }
Documentation reproduced from package phangorn, version 2.5.5, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.