agents sorted according to their value.
1 2 3 4 5 6 7 8 9 10
Character. The name of the selected
world must not be provided if
The sorting of the
agents is done in a increasing order.
ncol = 2) with the first column
pxcor and the second column
pycor representing the coordinates of the
patches sorted according to
their values, if
AgentMatrix representing the
turtles sorted according
var values, if
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
1 2 3 4 5 6 7 8 9
# Patches w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = sample(1:5, size = 25, replace = TRUE)) plot(w1) p1 <- sortOn(agents = patches(w1), world = w1) # Turtles t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10)) sortHeadingT1 <- sortOn(agents = t1, var = "heading")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.