R/preprocessingPheno_steps.R
splitTimepointsPreprocessingPheno.RdAlign phenotype rows and metric matrices for each requested timepoint, and precompute the per-timepoint phenotype-plus-beta objects used by downstream modeling functions.
splitTimepointsPreprocessingPheno(
pheno,
metricsData,
SampleID = "Sample_Name",
timeVar = "Timepoint",
timepoints = "1,2",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_splitTimepointsPreprocessingPheno.txt"
)Data frame containing phenotype information.
Object returned by loadMetricsPreprocessingPheno().
Character. Name of the sample identifier column in pheno.
Character. Name of the timepoint column in pheno.
Character vector or comma-separated string of timepoints to retain.
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class "dnaEPICO_preprocessingPheno_timepoints"
containing the parsed timepoints and aligned per-timepoint subsets.
ex <- dnaEPICO:::examplePreprocessingPhenoStateDnaEpico()
timepoint_data <- splitTimepointsPreprocessingPheno(
pheno = ex$pheno,
metricsData = ex$metricsData,
SampleID = "Sample_Name",
timeVar = "Timepoint",
timepoints = "1,2",
verbose = FALSE,
logs = FALSE
)
timepoint_data$timepoints
#> [1] "1" "2"