Learn R Programming

RNetLogo (version 0.9.2)

NLReport: Reports a value or list of values

Description

NLReport reports NetLogo data back to R.

Usage

NLReport(reporter, nl.obj=NULL)

Arguments

reporter
A string conataining a NetLogo reporter. (Or a vector of strings.)
nl.obj
(optional) A variable holding a reference to a NetLogo instance created with NLStart.

Value

  • A list or, if necessary, a nested list with the reported values.

Details

Every reporter (= a command which will return a value), which can be called in the NetLogo Command Center, can be called with NLReport.

See Also

NLDoReport, NLDoReportWhile, NLGetPatches, NLGetAgentSet

Examples

Run this code
nl.path <- "C:/Program Files/NetLogo 4.1.3"
NLStart(nl.path)
model.path <- "/models/Sample Models/Earth Science/Fire.nlogo"
NLLoadModel(paste(nl.path,model.path,sep=""))
NLCommand("setup")
NLDoCommandWhile("burned-trees < 2200", "go")
noburned <- NLReport("burned-trees")

Run the code above in your browser using DataLab