agent_array_to_mat: Put agent_array into a matrix format

Description Usage Arguments Details Value

View source: R/agent-array-to-df.R

Description

Put agent_array into a matrix format

Usage

1
agent_array_to_mat(agent_array)

Arguments

agent_array

n_sims x n_agents x time array

Details

loop through array and make into a long matrix. Only record when there is a change in state. Do not record -1. Made so to eventually replace with a Rcpp function

Value

matrix with the following columns

sim

simulation id

agent_id

agent id

time

time

state

number between 0 and K-1


skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.