saveScenarios: saveScenarios

saveScenariosR Documentation

saveScenarios

Description

Saves the scenario data in a newly created or existing directory

Usage

saveScenarios(scenario_list, save_path = tempdir())

Arguments

scenario_list

An object of class scenario_list, e.g. created with simulateScenarios()

save_path

A string providing the path for the directory in which the directory of the scenario should be created, Default: tempfile

Value

A named list of length 2 with the scenario numbers and the save_path

Author(s)

Stephan Wojciekowski

See Also

simulateScenarios loadScenarios tempfile

Examples

  scenarios_list <- simulateScenarios(
    n_subjects_list     = list(c(10, 20, 30)),
    response_rates_list = list(rep(0.9, 3)),
    n_trials            = 10)

  save_info      <- saveScenarios(scenarios_list)
  scenarios_list <- loadScenarios(scenario_numbers = save_info$scenario_numbers,
                                  load_path        = save_info$path)

bhmbasket documentation built on March 18, 2022, 7:46 p.m.