Save expanded data to DuckDB
Value
A te_datastore_duckdb object.
See also
Other save_to:
save_to_csv()
,
save_to_datatable()
,
set_expansion_options()
Examples
if (require(duckdb)) {
duckdb_dir <- file.path(tempdir(), "expanded_trials_duckdb")
trial_to_expand <- trial_sequence("ITT") |>
set_data(data = data_censored) |>
set_expansion_options(output = save_to_duckdb(path = duckdb_dir), chunk_size = 500)
# Delete directory after use
unlink(duckdb_dir)
}
#> Loading required package: duckdb
#> Loading required package: DBI