View source: R/tidyMS_R6_Modelling.R
adjust_p_values | R Documentation |
adjust columns
adjust_p_values(
mm,
column = "p.value",
group_by_col = "contrast",
newname = "FDR"
)
bb <- c(runif(1000), rexp(1500,rate=5))
length(bb)
bb <- bb[bb < 1]
length(bb)
bb <- bb[1:2000]
hist(bb)
data <- data.frame(contrast = rep(LETTERS[1:5],400), p.value = bb)
dataX <- adjust_p_values(data)
Adata <- dataX |> dplyr::filter(contrast == "A")
stopifnot(all.equal(Adata$FDR, p.adjust(Adata$p.value, method="BH")))
data2 <- adjust_p_values(data, group_by_col = NULL)
stopifnot(all.equal(data2$FDR, p.adjust(data2$p.value, method="BH")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.