createSample_times: Create time for terminal branches in the phylogenetic tree

View source: R/simulations.R

createSample_timesR Documentation

Create time for terminal branches in the phylogenetic tree

Description

Function to sample time for each terminal branch in a phylogenetic tree. This sampling will be stratified through time, which is equal time increments between samples. Samples here is each terminal branch in the phylogenetic tree.

Usage

createSample_times(time_region, time_exog, state_info)

Arguments

time_region

numeric which is the start time for sampling

time_exog

numeric which is the maximum time for sampling

state_info

dataframe containing the information of tip names and state. State is a character associating each tip to a deme of the structured coalescent model. #'

Value

numeric vector for sampling times. Each value in the vector is named using the name used for the tips in the phylogenetic tree.

Examples

tip_data <- create_tip_names()
sampleTimes <- createSample_times(time_region = 2020.15,
                                  time_exog = 2020.0,
                                  state_info = tip_data)

thednainus/sarscov2simulations documentation built on Feb. 9, 2023, 2:12 p.m.