agentMatrix | R Documentation |
agentMatrix
objectThis is a fast alternative to the SpatialPointsDataFrame
.
It is meant to replace that functionality, though there are not as many methods (yet).
The object is primarily a numeric matrix.
Any character column passed to ...
will be converted to a numeric, using as.factor
internally, and stored as a numeric.
Methods using this class will automatically convert character queries to the correct numeric
alternative.
agentMatrix(..., coords) ## S4 method for signature 'matrix' agentMatrix(..., coords) ## S4 method for signature 'missing' agentMatrix(..., coords)
... |
Vectors, a data.frame, or a matrix of extra columns to add to the coordinates,
or a |
coords |
A matrix with 2 columns representing |
An agentMatrix
object
Eliot McIntire
https://ccl.northwestern.edu/netlogo/docs/dictionary.html#clear-turtles
newAgent <- agentMatrix( coords = cbind(pxcor = c(1, 2, 5), pycor = c(3, 4, 6)), char = letters[c(1, 2, 6)], nums2 = c(4.5, 2.6, 2343), char2 = LETTERS[c(4, 24, 3)], nums = 5:7) w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = runif(25)) t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.