agents which have their variable
among the maximum values.
maxNof(agents, n, world, var) # S4 method for matrix,numeric,worldMatrix,missing maxNof(agents, n, world) # S4 method for matrix,numeric,worldArray,character maxNof(agents, n, world, var) # S4 method for agentMatrix,numeric,missing,character maxNof(agents, n, var)
Character. The name of the selected
ncol = 2,
n) with the first column
the second column
pycor representing the coordinates of the
patches among the
agents which have their variable values among
the maximum values among the
AgentMatrix of length
n representing the
turtles among the
var values among the maximum values among the
world must not be provided if
If there is a tie that would make the number of returned
n, it is broken randomly.
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:10, size = 25, replace = TRUE)) plot(w1)