Convert simulation output from simulate_SIR_agents to data frame format

sim_arr_to_df(arr)

Arguments

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

Value

data.frame of dimension (n_agents x n_sims) x 4 where the columns are

agent_id

unique ID

sim

simulation number

tI

time of infection

tR

time of recovery