Constructor (the save_to_* convention) for the Rust-backed te_datastore
subclass. Like the reference backends it does no work — it returns an empty
store to hand to TrialEmulation::set_expansion_options(). The expansion is
run later by expand_trials_tters().
Details
Requires the TrialEmulation (and data.table) package: the returned object
is an S4 subclass of TrialEmulation's te_datastore, so the class only
exists when TrialEmulation is installed.
See also
expand_trials_tters() to populate it with a Rust-fast expansion.
Examples
# The storage backend on its own:
save_to_tters()
#> Error: save_to_tters() requires the 'TrialEmulation' and 'data.table' packages. Install them with install.packages(c('TrialEmulation', 'data.table')).
# Wired into a trial_sequence() pipeline (requires TrialEmulation):
# \donttest{
if (requireNamespace("TrialEmulation", quietly = TRUE)) {
library(TrialEmulation)
data("data_censored")
trial_sequence("ITT") |>
set_data(data = data_censored) |>
set_outcome_model(adjustment_terms = ~x2) |>
set_expansion_options(output = save_to_tters(), chunk_size = 0)
}
# }