| patchHere {NetLogoR} | R Documentation |
Patches here
Description
Report the coordinates of the patches under the turtles
locations.
Usage
patchHere(world, turtles)
## S4 method for signature 'worldNLR,agentMatrix'
patchHere(world, turtles)
Arguments
world |
|
turtles |
|
Details
If a turtle is located outside of the world's extent,
NA are returned
for the patch coordinates.
Value
Matrix (ncol = 2) with the first column pxcor and the second column
pycor representing the coordinates of the patches at the turtles
location. The order of the patches follows the order of the turtles.
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#patch-here
Examples
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9)
t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10))
patchHere(world = w1, turtles = t1)
[Package NetLogoR version 1.0.5 Index]