% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module3_replicate.R
\name{calc_replicate_correlation}
\alias{calc_replicate_correlation}
\title{Pairwise replicate correlation between plates}
\usage{
calc_replicate_correlation(
  data,
  value = "viability",
  compound_col = "compound_id",
  plate_col = "plate_id"
)
}
\arguments{
\item{data}{An \code{hts_norm} object or long data frame.}

\item{value}{Name of the value column. Default \code{"viability"}.}

\item{compound_col}{Name of the compound column. Default \code{"compound_id"}.}

\item{plate_col}{Name of the plate column. Default \code{"plate_id"}.}
}
\value{
A data frame with one row per plate pair: \code{plate_x}, \code{plate_y}, \code{n},
\code{pearson_r} and \code{r_squared}. The wide compound-by-plate matrix is attached
as \code{attr(x, "wide")} for use by \code{\link[=plot_replicate_scatter]{plot_replicate_scatter()}}.
}
\description{
Computes the Pearson correlation (and its \eqn{R^2}) between the per-compound
activity of every pair of replicate plates, the standard check that technical
replicates agree.
}
\examples{
norm <- norm_by_control(baseline_subtract(read_hts_plate(hts_primary_raw)))
calc_replicate_correlation(norm)

}
\seealso{
\code{\link[=calc_replicate_cv]{calc_replicate_cv()}}, \code{\link[=plot_replicate_scatter]{plot_replicate_scatter()}}
}
