Skip to contents

Returns a tibble with all agents in the same order as the agent objects were initially added. Columns represent a unique identifier named .id, all agent characteristics, and all agent variables. Not that, if not at least one tick has passed, agent variables are NA. Any characteristics that some agents have while others do not will be NA for those agents who do not share this particular characteristic. Typically, characteristics/variables added internally through a particular environment are prefixed with ..

Usage

convert_agents_to_tibble(.tidyabm)

Arguments

.tidyabm

the tidyabm_env object holding some agents

Value

a tibble

Examples

create_grid_environment(seed = 4583, size = 4) %>%
  add_agents(create_agent(), 2) %>%
  convert_agents_to_tibble()
#> # A tibble: 2 × 3
#>   .id      .x    .y
#>   <chr> <int> <int>
#> 1 A1        2     4
#> 2 A2        1     4