evalBranch: evalBranch

View source: R/evalBranch.R

evalBranchR Documentation

evalBranch

Description

The function calculates whether a change in the terminal branch length generates a change in the area selected; and when applies, the terminal branch length value for that change.

Usage

evalBranch(
  tree = tree,
  distribution = distribution,
  branchToEval = branchToEval,
  approach = "lower",
  root = FALSE,
  index = "PD",
  maxMultiplier = 1.01,
  redondeo = 2,
  verbose = FALSE
)

Arguments

tree

is a single tree with T terminals, an APER phylo object.

distribution

is a labeled matrix object, with the distribution of T terminals (columns) in A areas (rows).

branchToEval

is the number/name of the branch to evaluate, "terminals" or "internals" evaluate only those named, while "all", evaluates all terminals/internals and will generate a multiBlepd object (S3).

approach

is the type of limit to evaluate, "upper": from the actual length to maxVal [*maxMultiplier], or "lower": from the actual length to 0.0, or "all" (default = "upper").

root

is use.root in PD function (default = FALSE).

maxMultiplier

is the value to multiply the sum of the branch length values. The upper limit to evaluate will be BL_sum * maxMultiplier (default = 1.01).

verbose

is the length of the speech (default = FALSE).

Value

Returns a S3 object [class blepd] with all the relevant information: whether there is no-change/change in area as we change the terminal branch length, the maxPD difference for the upper/lower limit, the branch length of the change, the best Initial Area, the actual (initial) branch length, and the area selected.

Author(s)

Miranda-Esquivel Daniel R.

Examples

library(blepd)
data(tree)
data(distribution)
evalBranch(tree = tree , distribution = distribution , 
           branchToEval = "all" ,  approach = "lower" , 
           root = TRUE)



Dmirandae/blepd documentation built on April 2, 2024, 12:24 p.m.