| other {NetLogoR} | R Documentation |
Others
Description
Report an agentset of the agents except specific ones.
Usage
other(agents, except)
## S4 method for signature 'matrix,matrix'
other(agents, except)
Arguments
agents |
Matrix ( `AgentMatrix` object representing the moving `agents`. |
except |
Matrix ( `AgentMatrix` object representing the moving `agents`. |
Details
Both agents and except must be of the same class (e.g., both
patches or both turtles).
Warning: this function removes `turtles` only based on similar `who` numbers
and `breed` names.
Value
Matrix (ncol = 2) with the first column pxcor and the second
column pycor representing the patches in agents without
the ones in except, or
`AgentMatrix` representing the `turtles` in `agents` without
the ones in `except`.
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#other
Examples
# Patches
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9)
p1 <- other(agents = patches(w1), except = patch(w1, 0, 0))
NLcount(p1) # 99 patches
# Turtles
t1 <- createTurtles(n = 10, coords = cbind(xcor = 0, ycor = 0))
t2 <- other(agents = t1, except = turtle(t1, who = 0))
NLcount(t2) # 9 turtles