stackWorlds: Stack 'worlds'

stackWorldsR Documentation

Stack worlds

Description

Stack multiple worldMatrix into a worldArray.

Usage

stackWorlds(...)

## S4 method for signature 'worldMatrix'
stackWorlds(...)

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.

Details

The worldMatrix objects must all have the same extents.

Value

worldArray object.

Author(s)

Sarah Bauduin

Examples

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)


PredictiveEcology/NetLogoR documentation built on Jan. 31, 2024, 9:31 p.m.