Put agent_array into a matrix format
agent_array_to_mat(agent_array)
agent_array | n_sims x n_agents x time array |
---|
matrix with the following columns
simulation id
agent id
time
number between 0 and K-1
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