createWorld: Create a 'world'

Description Usage Arguments Details Value Author(s) References Examples

Description

Create a world of patches of class worldMatrix.

Usage

1
2
3
4
5
6
7
createWorld(minPxcor, maxPxcor, minPycor, maxPycor, data = NA)

## S4 method for signature 'numeric,numeric,numeric,numeric,ANY'
createWorld(minPxcor, maxPxcor, minPycor, maxPycor, data = NA)

## S4 method for signature 'missing,missing,missing,missing,missing'
createWorld()

Arguments

minPxcor

Integer. Minimum pxcor for the patches (world's left border).

maxPxcor

Integer. Maximum pxcor for the patches (world's right border).

minPycor

Integer. Minimum pycor for the patches (world's bottom border).

maxPycor

Integer. Maximum pycor for the patches (world's top border).

data

Vector of length 1 or length (maxPxcor - minPxcor + 1) * (maxPycor - minPycor + 1). Default is NA.

Details

If data is provided, values are assigned by rows.

If no parameters value are provided, default values are: minPxcor = -16, maxPxcor = 16, minPycor = -16, and maxPycor = 16.

See help("worldMatrix-class") for more details on the worldMatrix class.

Value

WorldMatrix object composed of (maxPxcor - minPxcor + 1) * (maxPycor - minPycor + 1) patches (i.e., matrix cells).

Author(s)

Sarah Bauduin, Eliot McIntire, and Alex Chubaty

References

Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

Examples

1
2
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = 1:25)
plot(w1)

NetLogoR documentation built on July 10, 2021, 5:06 p.m.