NLDoCommand: Repeats execution of a command in the referenced NetLogo...

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

View source: R/NLDoCommand.R

Description

NLDoCommand executes a NetLogo command (submitted as a string) in the submitted NetLogo instance more than one time. It works like NLCommand.

Usage

1
NLDoCommand(iterations, ..., nl.obj=NULL)

Arguments

iterations

An integer defining the number of times the command is executed.

...

An undefined number of string(s) with the NetLogo command(s) to be executed. See NLCommand for details.

nl.obj

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

Details

This function is used to execute a command more than one time. It is usually used to call a procedure (e.g. "go") for a defined number of times.

Value

No return value.

Author(s)

Jan C. Thiele <rnetlogo@gmx.de>

See Also

NLCommand, NLDoCommandWhile, NLReport

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
nl.path <- "C:/Program Files/NetLogo 6.0/app"
NLStart(nl.path)
model.path <- "/models/Sample Models/Earth Science/Fire.nlogo"
NLLoadModel(paste(nl.path,model.path,sep=""))
NLCommand("setup")
NLDoCommand(10, "go")

## End(Not run)

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