Learn R Programming

TrialEmulation (version 0.0.4.2)

set_expansion_options: Set expansion options

Description

[Experimental]

Usage

set_expansion_options(object, ...)

# S4 method for trial_sequence_ITT set_expansion_options( object, output, chunk_size, first_period = 0, last_period = Inf )

# S4 method for trial_sequence_PP set_expansion_options( object, output, chunk_size, first_period = 0, last_period = Inf )

# S4 method for trial_sequence_ITT set_expansion_options( object, output, chunk_size, first_period = 0, last_period = Inf )

Value

object is returned with @expansion set

Arguments

object

A trial_sequence object

...

Arguments used in methods

output

A te_datastore object as created by a save_to_* function.

chunk_size

An integer specifying the number of patients to include in each expansion iteration

first_period

An integer specifying the first period to include in the expansion

last_period

An integer specifying the last period to include in the expansion

See Also

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

Examples

Run this code
output_dir <- file.path(tempdir(check = TRUE), "expanded_data")
ITT_trial <- trial_sequence("ITT") |>
  set_data(data = data_censored) |>
  set_expansion_options(output = save_to_csv(output_dir), chunk_size = 500)

# Delete directory
unlink(output_dir, recursive = TRUE)

Run the code above in your browser using DataLab