NLSetPatches: Sets a variable of all patches in the NetLogo world to the...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/NLSetPatches.R

Description

NLSetPatches is an easy way to set the values of all patches to the values of a matrix.

Usage

1
NLSetPatches(patch.var, in.matrix, nl.obj=NULL)

Arguments

patch.var

The name of the patch variable to set.

in.matrix

A matrix that represents the NetLogo world (has the same dimensions).

nl.obj

(optional) A string identifying a reference to a NetLogo instance created with NLStart.

Details

The matrix must have the same x- and y-dimensions as the NetLogo world, indices beginning with (1,1). The upper-left cell (1,1) of the matrix represents the upper-left patch of the NetLogo world, no matter where the origin of the NetLogo world is set. This function is not available when running NetLogo 3D. Use NLSetPatchSet instead.

Value

No return value.

Author(s)

Jan C. Thiele <rnetlogo@gmx.de>

See Also

NLReport, NLGetAgentSet, NLGetGraph, NLDfToList

Examples

1
2
3
4
5
6
7
## Not run: 
nl.path <- "C:/Program Files/NetLogo 6.0/app"
NLStart(nl.path)
m1 <- matrix(1:1089 , 33)
NLSetPatches("pcolor", m1)

## End(Not run)

RNetLogo documentation built on May 2, 2019, 5:54 p.m.