NLReport {RNetLogo}R Documentation

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

## 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)

[Package RNetLogo version 1.0-4 Index]