te_datastore_duckdb-class | R Documentation |
This method is used internally by expand_trials to save the data to the "datastore" defined in set_expansion_options.
## S4 method for signature 'te_datastore_duckdb'
save_expanded_data(object, data)
## S4 method for signature 'te_datastore_duckdb'
read_expanded_data(object, period = NULL, subset_condition = NULL)
## S4 method for signature 'te_datastore_duckdb'
sample_expanded_data(
object,
p_control,
period = NULL,
subset_condition = NULL,
seed
)
object |
An object of class te_datastore or a child class. |
data |
A data frame containing the expanded trial data. The columns |
period |
An integerish vector of non-zero length to select trial period(s) or |
subset_condition |
A string of length 1 or |
p_control |
Probability of selecting a control. |
seed |
An integer seed or |
A 'te_datastore_duckdb' object.
path
Path to the duckdb file containing the data.
table
.
con
S4 object of class duckdb_connection.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.