Learn R Programming

BMhyb (version 2.1.5)

ConvertEvonetToIgraphWithNodeNumbers: Convert an evonet object into igraph

Description

ape can already convert from evonet to igraph; the advantage of this function is that it uses the node ids from the evonet object for labels in igraph.

Usage

ConvertEvonetToIgraphWithNodeNumbers(phy.graph)

Arguments

phy.graph

An ape::evonet object (a phylogeny stored in phylo format that also includes a reticulation matrix)

Value

An igraph network

Examples

Run this code
# NOT RUN {
phy <- ape::rcoal(5)
phy.evo <- ape::evonet(phy, from=1, to=2)
plot(phy.evo) # this is the ape plot
phy.igraph <- ConvertEvonetToIgraphWithNodeNumbers(phy.evo)
plot(phy.igraph)
# }

Run the code above in your browser using DataLab