NLReport: Reports a value or list of values

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

View source: R/NLReport.R

Description

NLReport reports NetLogo data back to R.

Usage

1
NLReport(reporter, nl.obj=NULL)

Arguments

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 NLStart.

Details

Every reporter (commands which return a value) that can be called in the NetLogo Command Center can be called with NLReport.

Value

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.

Author(s)

Jan C. Thiele <rnetlogo@gmx.de>

See Also

NLDoReport, NLDoReportWhile, NLGetPatches, NLGetAgentSet

Examples

 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)

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