Learn R Programming

NetLogoR (version 1.0.5)

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)

Value

WorldMatrix object with NA values for all patches.

Arguments

world

WorldMatrix or worldArray object.

Author

Sarah Bauduin

References

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

See Also

Examples

Run this code
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