getID {ABM}R Documentation

Get the ID of the agent.

Description

Get the ID of the agent.

Arguments

agent

an external pointer returned by newAgent

Details

Before an agent is added to a population, its id is 0. After it is added, its id is the index in the population (starting from 1).

If agent is an R6 object, then we should either use agent$id, or use getID(agent$get)

Value

an integer value


[Package ABM version 0.4.1 Index]