How to have diagonal labels in R Corrgram?

非 Y 不嫁゛ 提交于 2019-12-12 06:53:12

问题


Corrgram docs have been misleading, since 2012, as discussed in the email thread how to change variable names in corrgram diagonal about putting labels on the diagonal. Many users think wrongly that diag.panel=... is the solution but it is not as seen in the following, but I cannot use labels because it is still not yet documented

yes, the argument "labels" it's working fine!

It would be great if the docs will be be updated also with this already implemented feature

Code

library("corrgram")

ages <- seq(1,18)

corrgram(baseball,
  diag.labels=ages)

Output

There were 50 or more warnings (use warnings() to see the first 50)

Fig. 1 Current output without wanted labels on diagonal

R: 3.3.1
OS: Debian 8.5


回答1:


Solution

corrgram(baseball,
  labels=ages)

Output



来源:https://stackoverflow.com/questions/40473615/how-to-have-diagonal-labels-in-r-corrgram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!