Learn R Programming

NetLogoR (version 0.3.9)

clearPatches: Clear world's patches

Description

Reset all patches values to NA.

Usage

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.

See Also

https://ccl.northwestern.edu/netlogo/docs/dictionary.html#clear-patches

Examples

Run this code
# NOT RUN {
w1 <- createWorld()
w1 <- NLset(world = w1, agents = patches(w1), val = runif(NLcount(patches(w1))))
w1Val <- of(world = w1, agents = patches(w1))
summary(w1Val)

w1 <- clearPatches(w1)
w1Val <- of(world = w1, agents = patches(w1))
summary(w1Val)


# }

Run the code above in your browser using DataLab