tomoment function

Converts a tree from Newick or matching to moment format

Converts a tree from Newick or matching to moment format

toMoment(inputobject, tip.label = NULL)

Arguments

  • inputobject: a tree in Newick format or a matching object defined in the ape package
  • tip.label: rearranged labels for tips; these must be the original labels

Details

The L-matrix class consists of 55 components: "L" is the L-matrix in square form. "L.ut" is the L-matrix in upper-triangular form. "Newick" is the Newick representation of the tree. "tip.label" is the character vector of tip labels. "tip.label.n" is the number of tips.

Returns

a moment L-matrix corresponding to the input phylogentic tree object

References

K Phillips, Symbolic Computation of the Central Moments of the Multivariate Normal Distribution, Journal of Statistical Software, 2010.

J. Felsenstein, The Newick tree format, 1990, http://evolution.genetics.washington.edu/phylip/newicktree.html

P.W. Diaconis and S. Holmes, Matchings and Phylogenetic Trees, Proc. Natl. Acad. Sci., 1998, 95(25), 14600-14602

Author(s)

Kem Phillips kemphillips@comcast.net

See Also

functions toNewick and toMatching

Examples

# create a Newick object exam.Newick <- "(((a,b),c),d);" # convert to a moment L-matrix exam.moment <- toMoment(exam.Newick) # convert to matching object exam.matching <- toMatching(exam.moment) # convert back to moment object backto.moment <- toMoment(exam.matching)
  • Maintainer: Kem Phillips
  • License: GPL
  • Last published: 2020-02-05

Useful links