我需要帮助在R中使用ggplot2,reshape2和Hmisc进行三角形热图,因为我需要在图上显示r和P值.
我试过cordata[lower.tri(c),]在很多地方插入它并没有帮助.我也试过使用不同的方法,但他们没有显示p值是一个rho,我需要!我试过在这里和谷歌上搜索"Hmisc + triangle + heatmap"并且发现没有任何效果.
这是原始数据,从excel表导入:df
# A tibble: 8 x 7
Urine Glucose Soil LB Gluconate River Colon
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 3222500 377750000 7847250 410000000 3252500 3900000 29800000
2 3667500 187000000 3937500 612000000 5250000 4057500 11075000
3 8362500 196250000 6207500 491000000 2417500 2185000 9725000
4 75700000 513000000 2909750 1415000000 3990000 3405000 NA
5 4485000 141250000 7241000 658750000 3742500 3470000 6695000
6 1947500 235000000 3277500 528500000 7045000 1897500 25475000
7 4130000 202500000 …Run Code Online (Sandbox Code Playgroud)