我想在 R 中制作一个彩色的不对称相关矩阵。本质上,它将是一个 4 x 6 的相关矩阵(看起来像这里的图)。我在这里模拟了一些数据作为示例数据集:
dat <- data.frame(col1 = sample(0:3, 10, replace = TRUE),
col2 = sample(0:3, 10, replace = TRUE),
col3 = sample(0:3, 10, replace = TRUE),
col4 = sample(0:3, 10, replace = TRUE),
col5 = sample(0:3, 10, replace = TRUE),
col6 = sample(0:3, 10, replace = TRUE),
col7 = sample(0:3, 10, replace = TRUE),
col8 = sample(0:3, 10, replace = TRUE),
col9 = sample(0:3, 10, replace = TRUE),
col10 = sample(0:3, 10, replace = TRUE))
我想要一个与col1
to相关的彩色相关图。有谁知道如何做到这一点?col4
col5
col10
谢谢!
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句