Learn R Programming

bhmbasket (version 1.0.0)

saveScenarios: saveScenarios

Description

Saves the scenario data in a newly created or existing directory

Usage

saveScenarios(scenario_list, save_path = tempdir())

Value

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

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

Author

Stephan Wojciekowski

See Also

simulateScenarios loadScenarios tempfile

Examples

Run this code
  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)

Run the code above in your browser using DataLab