agents sorted according to their value.
sortOn(agents, world, var) # S4 method for matrix,worldMatrix,missing sortOn(agents, world) # S4 method for matrix,worldArray,character sortOn(agents, world, var) # S4 method for agentMatrix,missing,character sortOn(agents, var)
Character. The name of the selected
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
world must not be provided if
The sorting of the
agents is done in a increasing order.
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
# Patches w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = sample(1:5, size = 25, replace = TRUE)) plot(w1)