treeTrans: treeTrans

Description Usage Arguments Examples

View source: R/treeScaling.R

Description

A function that transforms a tree, or a local part of a tree, according to lambda, kappa, delta, or a local rate.

Usage

1
2
treeTrans(tree, param, nodes = "root", tips = NULL, value,
  rescale = FALSE)

Arguments

tree

A tree of class phylo

param

The transformation applied to the tree, either "lambda", "kappa", "delta", "rate" or "EB".

nodes

A node number or vector of nodes describing the clade(s) to be transformed.

tips

A vector, or list of vectors, of tip labels definining clade(s) to be transformed

value

The value or vector of values to apply to the tree or parts of the tree. Order corresponds to the order of the elements of nodes or tips.

rescale

Whether or not to rescale the tree to have the same root-to-tip length after transformation. Defaults to TRUE.

Examples

1
2
3
transTree(tree, param = "lambda", nodes = 52, value = 0)
transTree(tree, param = "rate", nodes = c(52, 91), value = 3)
transTree(tree, param = "delta", tips = list(c("dog", "cat", "moose"), c("frog", "salamander", "newt")), value = c(0.3, 2))

hferg/btrtools documentation built on May 17, 2019, 3:56 p.m.