store_data: Store data from a simulation

Description Usage Arguments Details See Also

Description

The data from a simulation is typically stored in a simulation_analysis_object object, which is typically constructed by the tidy.simulation_data function. There are two methods for storing the data from an experiment: store.csv for storing the data in a .csv folder and store.wd for storing the simulation_analysis_object in the global environment.

Usage

1
2
3
store.csv( data, model_object, iterate, csv_name )

store.global(data, model_object, iterate, object_name)

Arguments

data

A simulation_analysis_object.

model_object

A model object.

iterate

A numeric corresponding to which iteration of the condition list generated the data. Defaults to NULL. Either iterate or csv_name/object_name must be specified.

object_name

For store.global. A string specifying the variable label that the data will be stored as in the global environment. Defaults to NULL. See details.

csv_name

For store.csv. A character specifying the file name for the .csv file. Defaults to NULL. See details.

Details

When writing to a .csv file with store.csv, the .csv file will contain:

1) An n x 2 matrix of strings with the first column listing the control objects required in the simulation and the second column containing strings that specify th parameters for the corresponding control object.

2) An n x 2 matrix of the data in time-event format.

By default, the name of the file will be "(model_object_name)_iterate_X.csv", where X is the iterate.

When storing the data in the global environment with store.global, the simulation_analysis_object is stored directly in the global environment with the name specified by object_name or the default "(model_object_name)_iterate_X" if object_name is unspecified. In general, when conducting a large scale simulation, it is not advised to use store.global because you will probably not have enough RAM to store everything that you want.

See Also

class.analysis_object for simulation_analysis_object.


Don-Li/CAB_original documentation built on May 6, 2019, 2:53 p.m.