set_expansion_options function

Set expansion options

Set expansion options

Description

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

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

Returns

object is returned with @expansion set

Examples

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)

See Also

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