这个问题从去年困扰我到现在,比较不是专业学代码的,一边学一边忘
先提前整理好excel表,P值按大小排好序
运行代码!
library(readxl)
library(dplyr)
data <- read_excel("qvalue.xlsx")#qvalue.xlsx 为已经在excel排好序的p值
page(p.adjust)
?p.adjust
p.adjust.methods
# [1] "holm" "hochberg" "hommel" "bonferroni" "BH"
# [6] "BY" "fdr" "none"
adj_p_vals <- p.adjust(data$P, method = "fdr")
adj_p_vals