5 \alias{as.phylo.evonet}
6 \alias{as.networx.evonet}
7 \alias{as.network.evonet}
8 \alias{as.igraph.evonet}
9 \title{Evolutionary Networks}
11 \code{evonet} builds a network from a tree of class
12 \code{"phylo"}. There are \code{print} and \code{plot} methods as well
13 as a few conversion functions.
16 evonet(phy, from, to = NULL)
17 \method{print}{evonet}(x, ...)
18 \method{plot}{evonet}(x, col = "blue", lty = 1, lwd = 1, alpha = 0.5,
19 arrows = 0, arrow.type = "classical", ...)
20 \method{as.phylo}{evonet}(x, ...)
21 \method{as.networx}{evonet}(x, weight = NA, ...)
22 \method{as.network}{evonet}(x, directed = TRUE, ...)
23 \method{as.igraph}{evonet}(x, directed = TRUE, use.labels = TRUE, ...)
26 \item{phy, x}{an object of class \code{"phylo"} or \code{"evonet"}.}
27 \item{from}{a vector (or a matrix if \code{to = NULL}) giving the node
28 or tip numbers involved in the reticulations.}
29 \item{to}{a vector of the same length than \code{from}.}
30 \item{col, lty, lwd}{colors, line type and width of the reticulations
31 (recycled if necessary).}
32 \item{alpha}{a value between 0 and 1 specifying the transparency of
34 \item{arrows}{see \code{\link{fancyarrows}}.}
35 \item{arrow.type}{idem.}
36 \item{weight}{a numeric vector giving the weights for the
37 reticulations when converting to the class \code{"networx"}
38 (recycled or shortened if needed).}
39 \item{directed}{a logical: should the network be considered as
40 directed? \code{TRUE} by default.}
41 \item{use.labels}{a logical specifying whether to use the tip and node
42 labels when building the network of class \code{"igraph"}.}
43 \item{\dots}{arguments passed to other methods.}
46 \code{evonet} is a constructor function that checks the arguments.
48 The classes \code{"networx"}, \code{"network"}, and \code{"igraph"}
49 are defined in the packages \pkg{phangorn}, \pkg{network}, and
50 \pkg{igraph}, respectively.
53 an object of class \code{c("evonet", "phylo")} which is made of an
54 object of class \code{"\link{phylo}"} plus an element
55 \code{reticulation} coding additional edges among nodes and uses the
56 same coding rules than the \code{edge} matrix.
58 The conversion functions return an object of the appropriate class.
60 \author{Emmanuel Paradis}
62 \code{\link[phangorn]{as.networx}} in package \pkg{phangorn}
66 (x <- evonet(tr, 6:7, 8:9))