[[,worldArray,ANY,missing-method {NetLogoR} | R Documentation |
Subsetting and replacing for worldArray
class
Description
Subsetting and replacing for worldArray
class
Usage
## S4 method for signature 'worldArray,ANY,missing'
x[[i]]
## S4 replacement method for signature 'worldArray,ANY,missing'
x[[i]] <- value
## S4 method for signature 'worldArray'
x$name
Arguments
x |
A |
i |
Index number or layer name specifying a subset of layer(s)
from the |
value |
A replacement |
name |
Layer name, normally without back ticks, unless has symbols. |
Value
The replacement method returns the original object, but with updated elements. The accessor method extracts the entire layer.
Examples
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9, data = runif(100))
w2 <- createWorld(0, 9, 0, 9, data = runif(100))
w3 <- createWorld(0, 9, 0, 9, data = runif(100) + 2) # add 2 so different range
a1 <- stackWorlds(w1, w2)
a1[[2]]
a1[[2]] <- w3
[Package NetLogoR version 1.0.5 Index]