powered by
turtles
Kill selected turtles.
die(turtles, who)# S4 method for agentMatrix,numeric die(turtles, who)
# S4 method for agentMatrix,numeric die(turtles, who)
AgentMatrix representing the turtles with the selected ones removed.
AgentMatrix
AgentMatrix object representing the moving agents.
agents
Integer. Vector of the who numbers for the selected turtles.
who
Sarah Bauduin
The who numbers of the remaining turtles are unchanged.
Wilensky, U. 1999. NetLogo. https://www.netlogo.org. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
https://docs.netlogo.org/dictionary.html#die
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4) t1 <- createTurtles(n = 10, world = w1) NLcount(t1) t1 <- die(turtles = t1, who = c(2, 3, 4)) NLcount(t1)
Run the code above in your browser using DataLab