agents values for the requested variable.
of(world, agents, var) # S4 method for missing,agentMatrix,character of(agents, var) # S4 method for worldMatrix,matrix,missing of(world, agents) # S4 method for worldArray,matrix,character of(world, agents, var)
WorldMatrix or worldArray object.
Matrix (ncol = 2) with the first column "pxcor" and the second column "pycor" representing the patches coordinates, or
AgentMatrix object representing the moving agents.
Character. Vector of the names of the selected
Vector of values for the
agents if one variable is
requested. The class depends
of the variable class. The order of the vector follows the order
Matrix or Dataframe (ncol =
length(var), nrow =
if more than one variable is requested. The row order
follows the order of the
world must be provided only if
agents are patches.
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 = 1:25) of(world = w1, agents = patch(w1, c(0, 0), c(4, 0)))#>  1 21# Turtles t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10)) of(agents = t1, var = "heading")#>  104.2435 100.6074 205.4716 107.7105 286.5729 162.4875 313.8517 100.3779 #>  256.6933 144.7627