addAgent {ABM}R Documentation

add an agent to a population

Description

add an agent to a population

Arguments

population

an external pointer to a population, for example, one returned by newPopulation()

agent

an external pointer to an agent, returned by newAgent() or getAgent()

Details

if the agent is an R6 class, we should use agent$get to get the external pointer. Similarly, if population is an R6 object, then we should either use population$addAgent() or population$get.


[Package ABM version 0.4.1 Index]