save_expanded_data {TrialEmulation} | R Documentation |
Method to save expanded data
Description
This method is used internally by expand_trials to save the data to the "datastore" defined in set_expansion_options.
Usage
save_expanded_data(object, data)
## S4 method for signature 'te_datastore_datatable'
save_expanded_data(object, data)
Arguments
object |
An object of class te_datastore or a child class. |
data |
A data frame containing the expanded trial data. The columns |
Value
An updated object
with the data stored. Notably object@N
should be increased
Examples
temp_dir <- tempfile("csv_dir_")
dir.create(temp_dir)
datastore <- save_to_csv(temp_dir)
data(vignette_switch_data)
save_expanded_data(datastore, vignette_switch_data[1:200, ])
# delete after use
unlink(temp_dir, recursive = TRUE)
[Package TrialEmulation version 0.0.4.0 Index]