char2Paths: turns a named vector of characters into a paths vector to be...

char2PathsR Documentation

turns a named vector of characters into a paths vector to be used with getAllCor

Description

turns a named vector of characters into a paths vector to be used with getAllCor

Usage

char2Paths(
  tip.vals,
  treesObj,
  altMasterTree = NULL,
  metric = "diff",
  se.filter = -1,
  ...
)

Arguments

tip.vals

the trait/phenotype/character value at the tip, names(tip.vals) should match some of the mastertree$tip.label, though a perfect match is not required

treesObj

A treesObj created by readTrees

metric

The metric used to translate node values into branch values. "Diff" takes the difference and makes the result phylogenetically independent. Other possible values are "mean" (the mean of the two values) and "last" the value of the most recent species on the branch. The last two options are not phylogenetically independent and downstream computations for those are not yet implemented

se.filter

Will remove branch values that are not at least se.filter*edge.se away from 0 (where edge.se is the standard error in the estimate for the edge value). Only implemented for metric="diff". Set se.filter to a positive value to filter. By default no filtering is done.

Value

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


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.