Loads the output from a NetLogo BehaviorSpace zexperiment.

load_bs_file(filename = NULL, text = NULL, quiet = TRUE)

load_bs_table(filename = NULL, text = NULL, quiet = TRUE)

load_bs_spreadsheet(filename = NULL, text = NULL, quiet = TRUE)

Arguments

filename

The name of a BehaviorSpace table output file (.csv format).

text

Text contents of a BehaviorSpace table output file (.csv format).

quiet

Logical value indicating whether to run quietly or report progress messages.

Value

A named list with elements:

  • data: a data frame containing the experiment data.

  • ind_vars: a character vector with the names of the independent variables.

  • dep_vars: a character vector with the names of the dependent variables.

  • mapping: a data frame mapping columns in data to variable names. By default, this just maps column names to themselves.

  • success: A logical variable indicating success or failure.

  • cause: A character variable indicating the cause of failure.

Details

This function loads and decodes table output from a NetLogo BehaviorSpace experiment. It can take either a filename or the text contents of such a file.

Functions

  • load_bs_table(): Load a BehaviorSpace experiment in table format.

  • load_bs_spreadsheet(): Load a BehaviorSpace experiment in spreadsheet format.

Examples

if (FALSE) { # \dontrun{
  load_bs_file(
    system.file("test_data/butterfly_small-experiment-table.csv",
      "analyzeBehaviorspace", mustWork = TRUE)
    )
} # }