prepareTree: Prepare phylogenetic tree to be used in 'phyloMed' function

prepareTreeR Documentation

Prepare phylogenetic tree to be used in phyloMed function

Description

The phyloMed function requires a rooted and binary tree as input. The prepareTree is an utility function that allows users to preprocess their tree if it is unrooted and/or non-binary. The tree output from prepareTree function can be directly fed into phyloMed function.

Usage

prepareTree(tree, verbose = FALSE)

Arguments

tree

A phylo-class object.

verbose

An optional logical value. If TRUE, tree manipulation process will be printed. Default is FALSE.

Value

A binary and rooted tree with nodes and tips conform with following phylo standards:

  • The internal nodes are numbered with value larger than the number of tips.

  • The internal nodes are numbered sequentially, with values increasing away from the root.

Author(s)

Qilin Hong qhong8@wisc.edu

Examples

# Load real data
data(data.cecal)
tree = prepareTree(data.cecal$tree)


KiRinHong/miMediation documentation built on March 31, 2024, 4:31 a.m.