getDiffPoints: For each tree, recurse up to tree to find most recent node...

View source: R/TimeTreesFunctions.R

getDiffPointsR Documentation

For each tree, recurse up to tree to find most recent node with a different state, or the root

Description

getDiffPoints

Usage

getDiffPoints(
  data,
  trait,
  height = "height",
  verbose = FALSE,
  tip_traits = NULL,
  eo_adjust = FALSE,
  eo_type = NULL,
  full_posterior = FALSE,
  summarize = TRUE,
  nproc = 1
)

Arguments

data

a tibble containing trees column from getTimeTrees

trait

column name of the trait of interest

height

which height value to return

verbose

print out info during run

tip_traits

vector of other traits to include for each tip. Must have been also specified as traits in formatClones.

eo_adjust

adjust heights using expectOccupancies. Recommended if EO model used, requires eo_type to specify the type whose occupancy is tracked)

eo_type

if eo_adjust, trait value described by expectedOccupancies (typically state 1 of 2)

full_posterior

Computer statistics using the full posterior distribution of trees?

summarize

if full_posterior=TRUE, summarize results or return the full table?

nproc

Number of cores to use (parallelizes by row of input data object)

Details

Returns a data frame where each row is a tip in each tree clone_id = clone id for that tree tip = tip name tip_tip = trait value for that tip tip_height = height value for that tip parent_node = most recent ancestor node with different trait value, or root parent_type = type of parent_node, will be "root" if at root node parent_height = height of parent_node child_node = most recent ancestor node before parent_node, or root child_type = type of child_node, will be "root" if at root node child_height = height of child_node root = 1 if at root node, 0 otherwise #' <other columns> copied over from airrClone object for each tip

if summarize=TRUE, parent_node and child_node will not be available instead: tip_type = type of tip parent_type = type of parent at different node samples = number of samples using this tip, tip_type, parent_type tip_height = height of tip parent_height_mean = mean of parent_height parent_height_95HPDlo = lower 95 parent_height_95HPDup = upper 95 child_height_mean = mean of parent_height child_height_95HPDlo = lower 95 child_height_95HPDup = upper 95 root_freq = frequency at which root == 1

Examples


## Not run: dp = getDiffPoints(data, "location", verbose=TRUE, 
 eo_adjust=TRUE, eo_type="germinal_center")
## End(Not run)


dowser documentation built on Sept. 16, 2026, 9:07 a.m.