% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationLME_steps.R
\name{summarizeTimepointsMethylationLME}
\alias{summarizeTimepointsMethylationLME}
\title{Summarize phenotype values by timepoint for longitudinal methylation analyses}
\usage{
summarizeTimepointsMethylationLME(
  data,
  timeVar = "Timepoint",
  phenotypes,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationLME.txt"
)
}
\arguments{
\item{data}{Data frame containing the longitudinal phenotype-plus-beta data.}

\item{timeVar}{Character. Name of the time variable.}

\item{phenotypes}{Character vector or comma-separated string of phenotype
variables to summarize.}

\item{verbose}{Logical. If \code{TRUE}, emit progress messages with \code{message()}.}

\item{logs}{Logical. If \code{TRUE}, write the same messages to a log file.}

\item{log_dir}{Character or \code{NULL}. Directory used for the log file when
\code{logs = TRUE}.}

\item{log_file}{Character. File name used when \code{logs = TRUE}.}
}
\value{
A data frame with one row per timepoint and summary columns for each
requested phenotype.
}
\description{
Summarize 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.
}
\examples{
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
timepoint_summary <- summarizeTimepointsMethylationLME(
    data = ex$preparedData$data,
    timeVar = "Timepoint",
    phenotypes = "score",
    verbose = FALSE,
    logs = FALSE
)
nrow(timepoint_summary)

}
