Description Usage Arguments Value
View source: R/path-functions.R
This function computes paths from all trees at once; it is much
faster than iterating over trees (e.g. as one would do using
purrr::map
).
1 | treelist_to_paths(treelist, tmax, equalize = TRUE)
|
treelist |
A list of lists. Each sublist corresponds to a single tree (i.e. a simulated path). Each tree is itself a list of tibbles, with one tibble for each depth level. |
tmax |
A positive scalar. The cut point for paths. |
equalize |
A logical scalar. If TRUE, make all paths end at
t_max by calling |
A data.frame
with columns id_sim
(unique path
ID), time
, n_infected
(cumulative number infected
– strictly increasing), n_infectious
(number currently
infectious).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.