NLcount | R Documentation |
Report the number of patches or turtles inside agents
.
NLcount(agents) ## S4 method for signature 'matrix' NLcount(agents)
agents |
Matrix ( `AgentMatrix` object representing the moving `agents`. |
Integer.
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#count
# Patches w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4) p1 <- patches(w1) NLcount(p1) # 25 patches # Turtles t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10)) NLcount(t1) # 10 turtles
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.