as.networx
convert splits
objects into a networx
object.
plot.networx
plot phylogenetic network or split graphs.as.networx(x, ...)
## S3 method for class 'splits':
as.networx(x, planar = FALSE, ...)
## S3 method for class 'networx':
plot(x, type="3D", use.edge.length = TRUE, show.tip.label=TRUE,
show.edge.label=FALSE, edge.label = NULL, show.node.label=FALSE,
node.label = NULL, show.nodes=FALSE, tip.color="blue",
edge.color="grey", edge.width=3, edge.lty=1, font=3,
cex=1, ...)
"splits"
(as.networx) or "networx"
(plot)TRUE
, i.e. the labels are shown).networx
object hold the information for a phylogenetic network
and extends the phylo
object. Therefore some generic function for
phylo
objects will also work for networx
objects.
The argument planar = FALSE will create a planar split graph based on a
cyclic ordering. These objects can be nicely plotted in "2D".
So far not all parameters behave the same on the the rgl "3D"
and basic graphic "2D" device.consensusNet
, neighborNet
, splitsNetwork
, hadamard
,
distanceHadamard
, layout.kamada.kawai
,
evonet
, as.igraph
, densiTree
set.seed(1)
tree1 = rtree(20, rooted=FALSE)
sp = as.splits(rNNI(tree1, n=10))
net = as.networx(sp)
plot(net)
# also see example in consensusNet
example(consensusNet)
Run the code above in your browser using DataLab