randomPycor: Random 'pycor'

randomPycorR Documentation

Random pycor

Description

Report n random pycor coordinates within the world's extent.

Usage

randomPycor(world, n)

## S4 method for signature 'worldNLR,numeric'
randomPycor(world, n)

Arguments

world

WorldMatrix or worldArray object.

n

Integer.

Value

Integer. Vector of length n of pycor coordinates.

Author(s)

Sarah Bauduin

References

Wilensky, U. 1999. NetLogo. https://www.netlogo.org. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

See Also

https://docs.netlogo.org/dictionary.html#random-pcor

Examples

w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9)
pycor <- randomPycor(world = w1, n = 10)


NetLogoR documentation built on Sept. 9, 2025, 5:27 p.m.