read.net | R Documentation |
This function reads a network from file using the Rich Newick format.
read.net(file = "", text = NULL, comment.char = "", ...)
file |
a file name specified by either a variable of mode character, or a double-quoted string; if |
text |
alternatively, the name of a variable of mode character which contains the tree(s) in parenthetic format. By default, this is ignored (set to |
comment.char |
a single character, the remaining of the line after this character is ignored (this is passed directly to |
... |
further arguments to be passed to |
If inheritance probabilities are included in the string, the returned evonet
object will include an inheritance
element. inheritance[i]
corresponds to the inheritance probability of the hybrid edge denoted in reticulation[i,]
This function also accepts the optional arguments skip
and tree.names
. tree.names
is used if there are several trees to be read and is a vector of mode character that gives names to the individual trees; if NULL
(the default), the trees are named "tree1"
, "tree2"
, ...
The optional argument skip
denotes the number of lines of the input file to skip before beginning to read data (this is passed directly to scan()
).
A phylogenetic network of class evonet
.
net<-read.net(text="((A:7,((B:2,C:2):3)#H1:2::0.6):3,(D:6,#H1:1::0.4):4);")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.