NLany | R Documentation |
Report TRUE
if agents
is non empty, report FALSE
otherwise.
NLany(agents) ## S4 method for signature 'matrix' NLany(agents)
agents |
Matrix ( `AgentMatrix` object representing the moving `agents`. |
Logical. TRUE
if there is at least one patch or one turtle in the
agents
, FALSE
otherwise.
Sarah Bauduin
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
https://ccl.northwestern.edu/netlogo/docs/dictionary.html#any
# Patches w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4) p1 <- noPatches() p2 <- patch(w1, 0, 0) NLany(p1) NLany(p2) # Turtles t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10)) t2 <- noTurtles() NLany(t1) NLany(t2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.