数值“corrplot”中 p 值的定位
更新
我希望将 p 值置于数字 corrplot
中的相关性下方。
library(corrplot)
M = cor(mtcars[ , 1:4])
testRes = cor.mtest(mtcars[ , 1:4], conf.level = 0.95)$p
## specialized the insignificant value according to the significant level
corrplot(
M,
method = "number",
insig = "p-value",
tl.pos = "lt",
p.mat = testRes,
sig.level = -1
)
但正如您所看到的,该函数将 p 值写在数值之上。
编辑:将拼写错误 t1.pos
修正为 tl.pos
(小写 l),如下用户所示。
UPDATED
I would like to have the p-values centered and underneath the correlations in a numeric corrplot
.
library(corrplot)
M = cor(mtcars[ , 1:4])
testRes = cor.mtest(mtcars[ , 1:4], conf.level = 0.95)$p
## specialized the insignificant value according to the significant level
corrplot(
M,
method = "number",
insig = "p-value",
tl.pos = "lt",
p.mat = testRes,
sig.level = -1
)
But as you can see, the function writes the p-values over top of the numerical quantities.
Edits: Fixed typo t1.pos
to be tl.pos
(lowercase l) as users indicated below.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好像有一个错字:输入参数叫:tl.pos;第二个字符是小写字母 L(而不是数字 1)。
There seems to be a typo: the input parameter is called: tl.pos; with the second character being the lowercase letter L (instead of the number 1).