View source: R/multiple_testing.R
| mtCorrectDF | R Documentation |
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.
mtCorrectDF(
df,
mtMethod = c("BY", "holm", "hochberg", "hommel", "bonferroni", "BH", "fdr", "none"),
colStr = "pval",
newColStr = "pvalAdj",
pvalThr = 0.05,
doOrder = TRUE,
nComp = nrow(df)
)
df |
A data frame with a p-values column. |
mtMethod |
Multiple testing correction method. Choices are 'BY' (default) 'holm', hochberg', hommel', 'bonferroni', 'BH', 'fdr' and 'none'. |
colStr |
Name of the column of p-values. |
newColStr |
Name of the column of adjusted p-values that will be created. |
pvalThr |
p-value threshold used for filtering. If |
doOrder |
Whether to increasingly order the data frame based on the adjusted p-values. |
nComp |
Number of comparisons. In most situations, this parameter should not be changed. |
A data frame with the p-value column corrected for multiple testing.
df <- data.frame(elem = c('A', 'B', 'C', 'D', 'E'),
pval = c(0.032, 0.001, 0.0045, 0.051, 0.048))
mtCorrectDF(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.