convert_shifts2regions: Converts shift values to optimum values on the edges.

View source: R/tools.R

convert_shifts2regionsR Documentation

Converts shift values to optimum values on the edges.

Description

Converts a model indicated with shift values to a model with optimum values on the edges.

Usage

convert_shifts2regions(tree, shift.configuration, shift.values)

Arguments

tree

ultrametric tree of class phylo with branch lengths.

shift.configuration

vector of edge indices with shifts.

shift.values

vector of shift values.

Value

vector of size number of edges with optimum value of the trait on the corresponding edge.

Examples


data(lizard.tree, lizard.traits)

sc <- c(55, 98, 118, 74, 14, 77,  32, 164)
sv <- c(2 ,  3,   4,  4,  1,  2, 0.5,   1)

root.value <- -2

optimum.values <- convert_shifts2regions(lizard.tree, sc, sv) + root.value



khabbazian/l1ou documentation built on Aug. 10, 2022, 7:41 p.m.