Get a tibble of direct neighbors
Arguments
- agent
the agent for whom the neighbors should be collected (
me)- abm
the whole environment model
- which
one of the following:
oto get up to 8 neighbors surroundingme(default)+to get up to 4 neighbors directly next tome(no diagonals)-to get up to 2 x-axis neighbors, one on each side ofme|to get up to 2 y-axis neighbors, one above and one belowme
Value
a tibble of neighboring agents in no particular order with their characteristics and variables set
See also
Other utilities:
get_characteristic(),
get_random_agent(),
get_variable(),
grid_get_free_neighboring_spots(),
grid_get_free_spots(),
grid_move(),
network_connect(),
network_get_neighbors(),
network_spread(),
remove_agent(),
stop_abm()