从 ggpairs 中删除 *(重要性)

标签 r

GGally::ggpair 的最新版本中,相关值用 * 显示,如下图所示。我想删除 *s 并保留相关值。

我看过 ggpairs 代码,但它对我来说并不明显。

GGally::ggpairs(data = iris[, 1:4])

enter image description here

最佳答案

library(GGally)

GGally::ggpairs(data = iris[, 1:4], 
                upper = list(continuous = GGally::wrap(ggally_cor, stars = F)))

enter image description here

根据文档:

If a specific function needs its parameters set, wrap(fn, param1 = val1, param2 = val2) the function with its parameters.

starsGGally::ggally_cor 的函数参数:

logical value which determines if the significance stars should be displayed. Given the cor.test p-values...

关于从 ggpairs 中删除 *(重要性),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66268835/

相关文章:

r - 为什么 if 和 else 语句不能在 R 中的不同行上

R:如何对命名向量中的元素窗口进行切片

r - 在满足条件之前,在 R - NAs 中满足条件之前计算行数

mysql - RMySQL 包错误

r - 在 write.table 中追加数据时使用列名

R:如果范围包含向量中的值(许多范围和大向量),则提取范围

r - 如何模糊ggplot中的部分情节?

r - R 中的否定,如何替换 R 中否定后面的单词?

r - qplot() 中的行为可能不一致?

r - 将 R 代码与 Web 服务器集成