R/preprocessingPheno_steps.R
writePreprocessingPhenoOutputs.RdWrite the legacy CSV, ZIP, and .RData outputs produced by
preprocessingPheno(). This helper keeps file writing separate from the
in-memory preprocessing steps.
writePreprocessingPhenoOutputs(
preprocessingData,
outputPheno = "data/preprocessingPheno",
outputRData = "rData/preprocessingPheno/metrics",
outputRDataMerge = "rData/preprocessingPheno/mergeData",
outputDir = "data/preprocessingPheno",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_writePreprocessingPhenoOutputs.txt"
)Object returned by preprocessingPheno() or a list
with the same components.
Character. Directory used for saved phenotype CSV files.
Character. Directory used for saved metric .RData files.
Character. Directory used for saved merged
phenotype-plus-beta .RData files.
Character. Directory used for the Clock Foundation export files.
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_paths"
containing the paths written to disk.
ex <- dnaEPICO:::examplePreprocessingPhenoStateDnaEpico()
output_paths <- writePreprocessingPhenoOutputs(
preprocessingData = ex$preprocessingData,
outputPheno = file.path(ex$tempDir, "pheno"),
outputRData = file.path(ex$tempDir, "metrics"),
outputRDataMerge = file.path(ex$tempDir, "merge"),
outputDir = file.path(ex$tempDir, "clock"),
verbose = FALSE,
logs = FALSE
)
names(output_paths)
#> [1] "timepoints" "combinedPheno" "combinedPhenoBeta"
#> [4] "betaCSV" "betaZIP" "phenoCF"