Skip to contents

A scenario keeps its tables either in memory or on disk (isInMemory()). to_disk() writes the tables to the scenario folder and returns the scenario holding pointers to them; to_memory() reads them back and returns the scenario holding the tables. Saving (save_scenario()) and loading (load_scenario()) do not change the mode: a loaded scenario is on disk.

Usage

to_disk(object, path = NULL, verbose = isVerbose())

to_memory(object, verbose = isVerbose())

Arguments

object

a scenario.

path

character, the scenario folder; the scenario's own by default.

verbose

logical or level, see isVerbose().

Value

the scenario.

Examples

if (FALSE) { # \dontrun{
scen <- to_disk(scen)     # tables in the scenario folder, memory released
isOnDisk(scen)
scen <- to_memory(scen)   # tables back in the object
} # }