【发布时间】:2021-02-02 14:03:30
【问题描述】:
我有两个具有相同行数和不同列数的数据框。我使用 psych 包执行 corr.test :
Correlations <- corr.test(final_x, final_y, use = "pairwise", alpha=0.05, method = "spearman")
现在我在运行corr.test 后确实有输出(例如相关性)。我可以单独保存Correlation$p 或Correlation$r 并制作热图。
但我的问题是我想绘制Correlation 本身的对角线图,Correlation$p 在图的右上角,Correlations$r 在图的左下角。
我试过了,但没有帮助:
corPlot(Correlations,numbers=TRUE,colors=TRUE,n=51,main=NULL,zlim=c(-1,1),
show.legend=TRUE, labels=NULL,n.legend=10,keep.par=TRUE,select=NULL, pval=NULL,
cuts=c(.001,.01),scale=TRUE,cex,MAR,upper=TRUE,diag=TRUE, symmetric=TRUE,stars=FALSE,
adjust="holm",xaxis=1, xlas=0,ylas=2,gr=NULL,alpha=.75,min.length=NULL)
如果你能给我一些帮助,那就太好了。
谢谢
【问题讨论】:
标签: r ggplot2 plot correlation