R/methylationGLMM_T1T2_steps.R
summarizeTimepointsMethylationGLMM_T1T2.RdSummarize the requested phenotype variables by timepoint. Numeric phenotypes are reported with mean, standard deviation, and non-missing counts; non-numeric phenotypes are reported with non-missing counts and the observed levels.
summarizeTimepointsMethylationGLMM_T1T2(
data,
timeVar = "Timepoint",
phenotypes,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_methylationGLMM_T1T2.txt"
)Data frame containing the longitudinal phenotype-plus-beta data.
Character. Name of the time variable.
Character vector or comma-separated string of phenotype variables to summarize.
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 data frame with one row per timepoint and summary columns for each requested phenotype.
ex <- dnaEPICO:::exampleMethylationGLMMStateDnaEpico()
timepoint_summary <- summarizeTimepointsMethylationGLMM_T1T2(
data = ex$preparedData$data,
timeVar = "Timepoint",
phenotypes = "score",
verbose = FALSE,
logs = FALSE
)
nrow(timepoint_summary)
#> [1] 2