Description Usage Arguments Details Value Author(s) References See Also
The two functions convert phylogenies in a standard format (newick or phylo) into a form that can be supplied as the argument phydata
of phyreg
. If node heights are specified, these are also provided in the value returned.
1 2 | phyfromnewick(file = "", text)
phyfromphylo(phylo)
|
file |
a textfile containing the newick phylogeny, which must end with a semi-colon ( |
text |
a character variable containing the newick phylogeny, which must end with a semi-colon. Exactly one of these arguments should be supplied ( |
phylo |
an R-variable containing a "phylo" object, as used, for example, in the |
Before passing the text to read.newick
, I strip out all the spaces, to avoid problems.
phyfromnewick
contains a function read.newick
which "reads Newick style tree with branch lengths into memory as an ape
"phylo" object", and was written by Liam J. Revell in 2011, and downloaded on 24th January 2014. See references for url.
Examples are given under phyreg
.
phy |
The phylogenetic vector in internal format, with an element for every node, except the root, but including species. If |
hts |
The heights of each node, a vector with an element for every node. Thus it is longer by one than $phy. Suitable for supplying as the |
orphylo |
The "phylo" style object created by |
Alan Grafen,
with an internal function (read.newick
) written by Liam J. Revell in 2011, downloaded on 24th January 2014. See references for url.
https://github.com/liamrevell/phytools/blob/master/R/read.newick.R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.