select_progenitor: Wrapper to select single progenitor in each case

select_progenitorR Documentation

Wrapper to select single progenitor in each case

Description

Wrapper to select single progenitor in each case

Usage

select_progenitor(
  tree,
  lineages,
  k_tree,
  incursions,
  si_fun,
  dist_fun,
  params,
  known = FALSE
)

Arguments

tree

the data.table with possible case pairs to select from

lineages

a data table with two columns, id_case and lineage, designating a lineage assignment for each case, defaults to NULL which means trees wont be resolved to a phylogeny

k_tree

the data.table with the known tree (when use_known_source = TRUE, NULL otherwise)

si_fun

the function to get the probability of a given temporal difference between cases in days (i.e. the serial interval)

dist_fun

the function to get the probability of a given spatial difference between cases in meters (i.e. the dispersal kernel)

params

list of parameters to pass to si_fun and dist_fun

incursion

the data.table with incursions (when prune =TRUE, NULL otherwise)

Value

a data.table filtered to the selected case-progenitor pair


mrajeev08/treerabid documentation built on Oct. 15, 2024, 12:14 p.m.