dm_save: Save an instance of Entity or Container.

Description Usage Arguments Examples

View source: R/utils-pipeline.R

Description

This is part of the dm_* family of functions to be used inside a microsimulation pipeline. This saves an instance of Entity or Container to a directory.

Usage

1
dm_save(x, dir = getOption("dymium.output_dir"))

Arguments

x

an instance of Entity of Container.

dir

By default this is set to the active scenario directory which can be viewed by calling getOption("dymium.output_dir"). x will be saved as a .RDS file with the name being the class name of x.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# create a World object and assign it as 'world' to the global environment.
create_toy_world()

# this saves the 'world' object to the outputs folder of the active scenario folder.
dm_save(world)

## End(Not run)

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.