Report n
random xcor
and ycor
coordinates within the world
's extent.
randomXYcor(world, n) # S4 method for worldNLR,numeric randomXYcor(world, n)
world |
|
---|---|
n | Integer. |
Matrix (ncol
= 2, nrow
= n
) with the first column xcor
and the second
column ycor
.
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = runif(25)) t1 <- createTurtles(n = 10, coords = randomXYcor(world = w1, n = 10)) plot(w1)