如何在 R Corrgram 中使用对角线标签?

How to have diagonal labels in R Corrgram?

自 2012 年以来,Corrgram 文档一直具有误导性,正如在电子邮件线程 how to change variable names in corrgram diagonal 中讨论的关于将标签放在对角线上。 许多用户错误地认为 diag.panel=... 是解决方案,但它不是如下所示,但我不能使用 labels 因为它还没有记录

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

代码

library("corrgram")

ages <- seq(1,18)

corrgram(baseball,
  diag.labels=ages)

输出

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

图1 当前输出在对角线上没有想要的标签

R: 3.3.1
OS:Debian 8.5

解决方案

corrgram(baseball,
  labels=ages)

输出