Combine selected timepoints that were already aligned by splitTimepointsPreprocessingPheno() into the wide phenotype-plus-beta objects used by downstream longitudinal models.

combineTimepointsPreprocessingPheno(
  timepointData,
  combineTimepoints = "1,2",
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_combineTimepointsPreprocessingPheno.txt"
)

Arguments

timepointData

Object returned by splitTimepointsPreprocessingPheno().

combineTimepoints

Character vector or comma-separated string of timepoints to combine.

verbose

Logical. If TRUE, emit progress messages with message().

logs

Logical. If TRUE, write the same messages to a log file.

log_dir

Character or NULL. Directory used for the log file when logs = TRUE.

log_file

Character. File name used when logs = TRUE.

Value

A list with class "dnaEPICO_preprocessingPheno_combined" containing the combined phenotype table, merged phenotype-plus-beta table, selected timepoints, and output suffix.

Examples

ex <- dnaEPICO:::examplePreprocessingPhenoStateDnaEpico()
combined_data <- combineTimepointsPreprocessingPheno(
  timepointData = ex$timepointData,
  combineTimepoints = "1,2",
  verbose = FALSE,
  logs = FALSE
)
combined_data$suffix
#> [1] "T1T2"