Skip to contents

Generates a list of data frames representing posterior transmission trees from an outbreaker_chains object. Each tree is represented as a data frame with 'from' and 'to' columns, and optionally includes additional columns.

Usage

get_trees(out, kappa = FALSE, t_inf = FALSE, ...)

Arguments

out

A data frame of class outbreaker_chains.

kappa

A logical indicating whether to include kappa values in the output. Default is FALSE.

t_inf

A logical indicating whether to include infection times (t_inf) in the output. Default is FALSE.

...

Additional named vectors from the original linelist to include as columns (e.g., loc = linelist$location).

Value

A list of data frames. Each data frame contains 'from' and 'to' columns, and optionally includes kappa, t_inf, and additional columns.

Examples

if (FALSE) { # \dontrun{
get_trees(out, ids = ids, group = group, dates = dates)
} # }