Put agent_array into a matrix format

agent_array_to_mat(agent_array)

Arguments

agent_array

n_sims x n_agents x time array

Value

matrix with the following columns

sim

simulation id

agent_id

agent id

time

time

state

number between 0 and K-1

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