% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module1_preqc.R
\name{calc_cv}
\alias{calc_cv}
\title{Control coefficient of variation per plate}
\usage{
calc_cv(
  hts_raw,
  signal_col = "signal",
  nc_label = "NC",
  pc_label = "PC",
  cv_max = 20
)
}
\arguments{
\item{hts_raw}{An \code{hts_raw} object.}

\item{signal_col}{Name of the signal column. Default \code{"signal"}.}

\item{nc_label, pc_label}{Well-type labels for the negative and positive
controls. Defaults \code{"NC"} and \code{"PC"}.}

\item{cv_max}{Acceptance threshold in percent, applied to both controls.
Default \code{20}.}
}
\value{
A data frame with one row per plate: \code{plate_id}, \code{cv_nc}, \code{cv_pc}
(percent) and a logical \code{pass} (both controls at or below \code{cv_max}).
}
\description{
The percent CV (\code{100 * SD / mean}) of each control population. \strong{What it is
for:} CV\% is the direct measure of pipetting and reagent-handling
reproducibility within a plate. Low, stable control CVs are a precondition
for every other metric; a control drifting above ~15--20\% flags a liquid-
handling or edge-effect problem even when the Z'-factor still passes.
}
\examples{
calc_cv(read_hts_plate(hts_primary_raw))

}
\seealso{
\code{\link[=calc_plate_qc]{calc_plate_qc()}}, \code{\link[=plot_plate_qc]{plot_plate_qc()}}
}
