% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessingMinfiEwasWater_steps.R
\name{filterSamplesMinfiEwasWater}
\alias{filterSamplesMinfiEwasWater}
\title{Filter failed samples from an RGSet and phenotype table}
\usage{
filterSamplesMinfiEwasWater(
  RGSet,
  targets,
  failedSamples = character(0),
  SampleID = "Sample_Name",
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_filterSamplesMinfiEwasWater.txt"
)
}
\arguments{
\item{RGSet}{An \code{RGChannelSet}.}

\item{targets}{Data frame containing phenotype information.}

\item{failedSamples}{Character vector of sample identifiers to remove.}

\item{SampleID}{Character. Name of the sample identifier column in \code{targets}.}

\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 list with class \code{'dnaEPICO_minfiEwasWater_samples'} containing the
filtered \code{RGSet}, aligned phenotype table, and failed sample identifiers.
}
\description{
Remove failed samples identified during sample assessment and return the
filtered \code{RGChannelSet} together with the aligned phenotype table.
}
\examples{
\dontshow{if (requireNamespace("minfiData", quietly = TRUE)) withAutoprint(\{ # examplesIf}
ex <- dnaEPICO:::exampleMinfiBaseDataDnaEpico()
filtered_samples <- filterSamplesMinfiEwasWater(
    RGSet = ex$RGSet,
    targets = ex$targets,
    failedSamples = ex$targets$Sample_Name[1],
    SampleID = "Sample_Name",
    verbose = FALSE,
    logs = FALSE
)
nrow(filtered_samples$targets)
\dontshow{\}) # examplesIf}
}
