Report a turtle agentset containing all unique turtles provided in the inputs.
turtleSet(...) # S4 method for agentMatrix turtleSet(...)
AgentMatrix objects representing the moving agents.
AgentMatrix object containing all the unique turtles.
Duplicated turtles are identified based only on their who numbers. The turtle chosen for a who number is the first one given in the inputs. To keep all turtles from the inputs, use NLset() to reassign who numbers in some of the inputs, prior using turtleSet(), to avoid turtles with duplicated who numbers.
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9) t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10), breed = "sheep") t2 <- createTurtles(n = 2, coords = randomXYcor(w1, n = 2), breed = "wolf") t2 <- NLset(turtles = t2, agents = t2, var = "who", val = c(10, 11)) t3 <- createTurtles(n = 1, coords = randomXYcor(w1, n = 1), breed = "sheperd") t3 <- NLset(turtles = t3, agents = t3, var = "who", val = 12) t4 <- turtleSet(t1, t2, t3)