save_to_duckdb function

Save expanded data to DuckDB

Save expanded data to DuckDB

Description

save_to_duckdb(path)

Arguments

  • path: Directory to save DuckDB database file in.

Returns

A te_datastore_duckdb object.

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) }

See Also

Other save_to: save_to_csv(), save_to_datatable(), set_expansion_options()