Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read.nexus.splits

Function to import and export splits and networks


Description

read.nexus.splits, write.nexus.splits, read.nexus.networx, write.nexus.networx can be used to import and export splits and networks with nexus format and allow to exchange these object with other software like Splitstree. write.splits returns a human readable output.

Usage

read.nexus.splits(file)

write.nexus.splits(obj, file = "", weights = NULL, taxa = TRUE, append = FALSE)

write.nexus.networx(obj, file = "", taxa = TRUE, splits = TRUE, append = FALSE)

read.nexus.networx(file, splits = TRUE)

write.splits(x, file = "", zero.print = ".", one.print = "|",
  print.labels = TRUE, ...)

Arguments

file

a file name.

obj

An object of class splits.

weights

Edge weights.

taxa

logical. If TRUE a taxa block is added

append

logical. If TRUE the nexus blocks will be added to a file.

splits

logical. If TRUE the nexus blocks will be added to a file.

x

An object of class splits.

zero.print

character which should be printed for zeros.

one.print

character which should be printed for ones.

print.labels

logical. If TRUE labels are printed.

...

Further arguments passed to or from other methods.

labels

names of taxa.

Value

write.nexus.splits and write.nexus.networx write out the splits and networx object to read with other software like Splitstree. read.nexus.splits and read.nexus.networx return an splits and networx object.

Note

read.nexus.splits reads in the splits block of a nexus file. It assumes that different co-variables are tab delimited and the bipartition are separated with white-space. Comments in square brackets are ignored.

Author(s)

See Also

Examples

(sp <- as.splits(rtree(5)))
write.nexus.splits(sp)
spl <- allCircularSplits(5)
plot(as.networx(spl), "2D")
write.splits(spl, print.labels = FALSE)

phangorn

Phylogenetic Reconstruction and Analysis

v2.7.0
GPL (>= 2)
Authors
Klaus Schliep [aut, cre] (<https://orcid.org/0000-0003-2941-0161>), Emmanuel Paradis [aut] (<https://orcid.org/0000-0003-3092-2199>), Leonardo de Oliveira Martins [aut] (<https://orcid.org/0000-0001-5247-1320>), Alastair Potts [aut], Tim W. White [aut], Cyrill Stachniss [ctb], Michelle Kendall [ctb], Keren Halabi [ctb], Richel Bilderbeek [ctb], Kristin Winchell [ctb], Liam Revell [ctb], Mike Gilchrist [ctb], Jeremy Beaulieu [ctb], Brian O'Meara [ctb], Long Qu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.