输入

与一个变量相关
depth = 1:6
p = c()
cor = c()
for(i in 1:ncol(df_g3))
{
res = cor.test(df_g3[,i], depth, method = c("pearson"))
p = c(p, res$p.value)
cor = c(cor, as.numeric(res$estimate))
}
out_g3 = data.frame(cazy=colnames(df_g3), p_raw=p, cor_value=cor)
out_g3_sig = out_g3[which(out_g3$p_raw<0.05),]

网友评论