Learn R Programming

NetLogoR (version 1.0.5)

stackWorlds: Stack worlds

Description

Stack multiple worldMatrix into a worldArray.

Usage

stackWorlds(...)

# S4 method for worldMatrix stackWorlds(...)

Value

worldArray object.

Arguments

...

worldMatrix objects. If passed as unnamed objects, then the function will attempt to use their object names as layer names. Alternatively, to be more reliable, these can be passed as named arguments. See examples.

Author

Sarah Bauduin

Details

The worldMatrix objects must all have the same extents.

Examples

Run this code
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = 1:25)
w2 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = 25:1)
w3 <- stackWorlds(w1, w2)
plot(w3)

# pass named arguments to specify a different name than the object name
w4 <- stackWorlds(layer1 = w1, layer2 = w2)

Run the code above in your browser using DataLab