Description Usage Arguments Value
View source: R/sir-array-to-df.R
Convert simulation output from simulate_SIR_agents to data frame format
1 | sim_arr_to_df(arr)
|
arr |
array of dimension \# agents \times \# sims \times 3 where agent ijk is the ith agent in simulation j, and looking at the kth column where 1 is the initial state, 1 is the time of infection, and 2 is the time of recovery |
data.frame of dimension (n_agents x n_sims) x 4 where the columns are
unique ID
simulation number
time of infection
time of recovery
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.