tree2Paths: Generate a phenotype paths vector from a phenotype tree

Description Usage Arguments Details Value

View source: R/RERfuncs.R

Description

tree2Paths generates a phenotype paths vector matching the treesObject from a tree where branches specify phenotypes.

Usage

1
tree2Paths(tree, treesObj, binarize = NULL, useSpecies = NULL)

Arguments

tree

A phenotype tree, with branch length encoding a phenotype.

treesObj

A treesObject created by readTrees

binarize

Force binary path representation. Default action depends upon the type of data within the phenotype tree (binary or continuous).

  • If binary (all branch lengths == 0 or 1): Sets all positive path values to 1. Useful if the tree has non-zero branch lengths for an internal branch or branches; otherwise, values are simply added along branches when calculating paths. Default behavior: binarize = TRUE.

  • If continuous (not all branch lengths == 0 or 1): Sets all path values > the mean to 1 and all those <= the mean to 0. Converts a continuous phenotype to a binary phenotype, with state determined by comparison to the mean across all paths. Default behavior: binarize = FALSE.

useSpecies

Give only a subset of the species to use for ancestral state reconstruction (e.g., only those species for which the trait can be reliably determined).

Details

The tree topology of the phenotype tree must match that of the master tree within the treesObject.

Value

A vector of length equal to the number of paths in treesObj


nclark-lab/RERconverge documentation built on Dec. 3, 2018, 7:12 p.m.