Reset all patches values to NA.

clearPatches(world)

# S4 method for worldMatrix
clearPatches(world)

# S4 method for worldArray
clearPatches(world)

Arguments

world

WorldMatrix or worldArray object.

Value

WorldMatrix object with NA values for all patches.

References

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

Author

Sarah Bauduin

Examples

w1 <- createWorld()
w1 <- NLset(world = w1, agents = patches(w1), val = runif(NLcount(patches(w1))))
w1Val <- of(world = w1, agents = patches(w1))
summary(w1Val)
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> 0.0004768 0.2532850 0.4995704 0.4985782 0.7449337 0.9997603 

w1 <- clearPatches(w1)
w1Val <- of(world = w1, agents = patches(w1))
summary(w1Val)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
#>      NA      NA      NA     NaN      NA      NA    1089