turtles2spdf | R Documentation |
agentMatrix
to SpatialPointsDataFrame
Convert an agentMatrix
object into a SpatialPointsDataFrame
object.
turtles2spdf(turtles)
## S4 method for signature 'agentMatrix'
turtles2spdf(turtles)
turtles |
|
SpatialPointsDataFrame
object representing the moving agents
(coordinates and data)
as contained in turtles
.
Sarah Bauduin
t1 <- createTurtles(n = 10, coords = cbind(xcor = 1:10, ycor = 1:10))
if (requireNamespace("sp", quietly = TRUE)) {
sp1 <- turtles2spdf(turtles = t1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.