die: Kill 'turtles'

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Kill selected turtles.

Usage

1
2
3
4
die(turtles, who)

## S4 method for signature 'agentMatrix,numeric'
die(turtles, who)

Arguments

turtles

AgentMatrix object representing the moving agents.

who

Integer. Vector of the who numbers for the selected turtles.

Details

The who numbers of the remaining turtles are unchanged.

Value

AgentMatrix representing the turtles with the selected ones removed.

Author(s)

Sarah Bauduin

References

Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

See Also

https://ccl.northwestern.edu/netlogo/docs/dictionary.html#die

Examples

1
2
3
4
5
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)

NetLogoR documentation built on July 10, 2021, 5:06 p.m.