NLCommand: Executes a command in the referenced NetLogo instance.

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

View source: R/NLCommand.R

Description

NLCommand executes a NetLogo command (submitted as a string) in the (submitted) NetLogo instance.

Usage

1
NLCommand(..., nl.obj=NULL)

Arguments

...

An undefined number of strings with the NetLogo command(s) to be executed. Vectors, lists and data.frames will be represented as NetLogo lists. To set a NetLogo list you can write 'set mylist',c(1,2,3) if the current NetLogo model knows a list named mylist. Furthermore, you can execute multiple commands in series, e.g. 'setup','go'

nl.obj

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

Details

The command can be anything which can be submitted from the NetLogo Command Center. A command has no return value! If you want to return a value from NetLogo use NLReport and other report functions.

Value

No return value.

Author(s)

Jan C. Thiele <rnetlogo@gmx.de>

See Also

NLDoCommand, NLDoCommandWhile, NLReport

Examples

1
2
3
4
5
## Not run: 
NLStart("C:/Program Files/NetLogo 6.0/app")
NLCommand("create-turtles 10")

## End(Not run)

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