||
install.packages("psych")
library(psych)
all=read.csv("1.csv")
abc <- corr.test(data.frame(all),method="spearman",adjust="none")
write.table(t(abc$r),"spearmanr.txt",sep="\t")
write.table(t(abc$p),"spearmanp.txt",sep="\t")
bcd <- corr.test(data.frame(all),method="pearson",adjust="none")
write.table(t(bcd$r),"pearsonr1.txt",sep="\t")
write.table(t(bcd$p),"pearsonp1.txt",sep="\t")
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-26 04:24
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社