phyfromnewick: Using phylogenies formatted in standard but "other" ways

Description Usage Arguments Details Value Author(s) References See Also

Description

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.

Usage

1
2

Arguments

file

a textfile containing the newick phylogeny, which must end with a semi-colon (phyfromnewick only)

text

a character variable containing the newick phylogeny, which must end with a semi-colon. Exactly one of these arguments should be supplied (phyfromnewick only)

phylo

an R-variable containing a "phylo" object, as used, for example, in the ape package (phyfromphylo only).

Details

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.

Value

phy

The phylogenetic vector in internal format, with an element for every node, except the root, but including species. If jj==phy[[ii], then jj is the parent-node of ii. It is a requirement for the internal format that jj>ii in every case (it is not true of "phylo" objects that a parent's ID has to be greater than its offspring's). Suitable for supplying as the phydata argument of phyreg

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 heightsdata argument of phyreg

orphylo

The "phylo" style object created by read.newick. (phylofromnewick only)

Author(s)

Alan Grafen, with an internal function (read.newick) written by Liam J. Revell in 2011, downloaded on 24th January 2014. See references for url.

References

https://github.com/liamrevell/phytools/blob/master/R/read.newick.R

See Also

phyreg


phyreg documentation built on May 2, 2019, 7:03 a.m.