% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multiple_testing.R
\name{mtCorrectDF}
\alias{mtCorrectDF}
\title{Perform multiple testing correction on a data frame column}
\usage{
mtCorrectDF(
  df,
  mtMethod = c("BY", "holm", "hochberg", "hommel", "bonferroni", "BH", "fdr", "none"),
  colStr = "pval",
  newColStr = "pvalAdj",
  pvalThr = 0.05,
  doOrder = TRUE,
  nComp = nrow(df)
)
}
\arguments{
\item{df}{A data frame with a p-values column.}

\item{mtMethod}{Multiple testing correction method. Choices are
'BY' (default) 'holm', hochberg', hommel', 'bonferroni', 'BH',  'fdr' and
'none'.}

\item{colStr}{Name of the column of p-values.}

\item{newColStr}{Name of the column of adjusted p-values that will be
created.}

\item{pvalThr}{p-value threshold used for filtering. If \code{NULL}, no
filtering will be performed.}

\item{doOrder}{Whether to increasingly order the data frame based on the
adjusted p-values.}

\item{nComp}{Number of comparisons. In most situations, this parameter
should not be changed.}
}
\value{
A data frame with the p-value column corrected for multiple testing.
}
\description{
This function orders a data frame based on a column of p-values, performs
multiple testing on the column, and filters the data-frame based on it.
}
\examples{
df <- data.frame(elem = c('A', 'B', 'C', 'D', 'E'),
pval = c(0.032, 0.001, 0.0045, 0.051, 0.048))
mtCorrectDF(df)

}
