如何隐藏Corrplot的选定相关性? [英] How to hide selected correlations for corrplot?

查看:85
本文介绍了如何隐藏Corrplot的选定相关性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编码和R语言的新手。我试图使用 corrplot 可视化相关矩阵,但不想显示所有相关值。我希望隐藏/取消选定的一部分相关的列和行的相关值,因此仅显示一个反转的 L值。

I am new to coding and R. I was trying to visualize a correlation matrix using corrplot, but don't want to show all the correlation values. I wish to hide/cancel a chunk of selected columns and rows correlation values, so only an inverted 'L' of values are shown.

例如,请参见编辑后的图像示例 corrplot 此处:

As an example, see edited image of an example corrplot here:

推荐答案

将要在图中空白的条目设置为 NA 在相关矩阵(或其副本)中,然后在参数列表中设置参数 na.label = 调用Corrplot。

Set those entries you want blank in the plot to NA in the correlation matrix (or a copy of it) and then set the argument na.label=" " in the call to corrplot.

这篇关于如何隐藏Corrplot的选定相关性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆