nl_set_measures R Documentation

Set or change measures of existing NetLogo experiment

Description

Set or change measures of existing NetLogo experiment

Usage

nl_set_measures(experiment, step = NULL, run = NULL, eval_criteria = NULL,
  eval_aggregate_fun = NULL, eval_mutate = NULL, as.data.frame = TRUE,
  step_transform = NULL)

Arguments

experiment

NetLogo experiment object

step

NetLogo reporters for each step (reported at every tick). A list of named character vectors. Use measures function to get the correct structure.

run

NetLogo reporters for each run (reported at end of run). A list of named character vectors. Use measures function to get the correct structure.

eval_criteria

A criteria calculation expressions. May use step or run data frames to calculate criteria. Elements from step should be aggregated. Must return named numeric vector.

eval_aggregate_fun

Aggregate criteria. It makes sense when when repetitions > 1

eval_mutate

Add criteria based on aggregated values

as.data.frame

Reporting in data frame format (TRUE by default)

step_transform

A function to transform data frame result from step reporters. When simulation has many steps and only summary data is needed, step_transform can reduce memory requirements to run experiment.

Details

Values of experiment measures are NetLogo reporters. Names of measures will be used in the resulting data frames as column names.

Value

NetLogo experiment object

See Also

To create an experiment object use nl_experiment