Description Usage Arguments Details Value Author(s) See Also Examples
NLReport
reports NetLogo data back to R.
1 |
reporter |
A string containing a NetLogo reporter. (Or a vector of strings.) |
nl.obj |
(optional) A string identifying a reference to a NetLogo instance created with |
Every reporter (commands which return a value) that can be called in the NetLogo Command Center
can be called with NLReport
.
A vector of length one if only one value is returned. Otherwise it is a list or, if necessary, a nested list with the reported values.
Jan C. Thiele <rnetlogo@gmx.de>
NLDoReport
,
NLDoReportWhile
,
NLGetPatches
,
NLGetAgentSet
1 2 3 4 5 6 7 8 9 10 11 | ## 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")
noburned <- NLReport("burned-trees")
str(noburned)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.