Learn R Programming

phangorn (version 1.99-1)

as.splits: Splits representation of graphs and trees.

Description

as.splits produces a list of splits or bipartitions.

Usage

as.splits(x, ...)
## S3 method for class 'phylo':
as.splits(x, ...)
## S3 method for class 'multiPhylo':
as.splits(x, ...)
## S3 method for class 'splits':
print(x, maxp = getOption("max.print"), zero.print = ".", 
    one.print = "|", ...)
## S3 method for class 'splits':
as.prop.part(x, ...)    
compatible(obj)
allSplits(k, labels = NULL)
write.nexus.splits(obj, file="", weights=NULL)
read.nexus.splits(file)
addConfidences(obj, phy)

Arguments

x
An object of class phylo or multiPhylo.
maxp
integer, default from options(max.print), influences how many entries of large matrices are printed at all.
zero.print
character which should be printed for zeroes.
one.print
character which should be printed for ones.
...
Further arguments passed to or from other methods.
obj
an object of class splits.
k
number of taxa.
labels
names of taxa.
file
a file name.
weights
Edge weights.
phy
An object of class phylo or multiPhylo.

Value

  • as.splits returns an object of class splits, which is mainly a list of splits and some attributes. compatible return a lower triangular matrix where an 1 indicates that two splits are incompatible.

See Also

prop.part, lento, distanceHadamard, as.networx

Examples

Run this code
(sp <- as.splits(rtree(5)))
write.nexus.splits(sp)

Run the code above in your browser using DataLab