Description Usage Arguments Value Examples
Get records from an agentSim history
1 | parse_history(sim, area = "agents")
|
sim |
An agentSim simulation |
a tibble
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #' #Example simulation in which each agent prints its own id to the console
init_pop <- tibble::tibble(
id = c(1:50),
x = runif(50, 0, 1),
y = runif(50, 0, 1)
)
agent_task <- create_agent_task({
print(agent$id)
})
sim <- agents_from_param_table(init_pop) %>%
set_task(agent_task) %>%
agent_sim(10) %>%
parse_history()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.