powered by
agentMatrix
sf
Convert an agentMatrix object into an sf object.
turtles2sf(turtles)# S4 method for ANY turtles2sf(turtles)
# S4 method for ANY turtles2sf(turtles)
sf object of POINT geometry representing the moving agents
POINT geometry
agents
(coordinates and data) as contained in turtles.
turtles
AgentMatrix object representing the moving agents.
AgentMatrix
Sarah Bauduin
t1 <- createTurtles(n = 10, coords = cbind(xcor = 1:10, ycor = 1:10)) if (requireNamespace("sf", quietly = TRUE)) { sf_t1 <- turtles2sf(turtles = t1) }
Run the code above in your browser using DataLab