library("modelsummary")
library(modelsummary)
<- mtcars[, c("mpg", "hp", "disp")]
dat
<- function(x) {
cor_fun <- cor(x, method = "kendall")
out datasummary_correlation_format(
out,fmt = 2,
upper_triangle = "x",
diagonal = ".")
}
datasummary_correlation(dat, method = cor_fun)
mpg | hp | disp | |
---|---|---|---|
mpg | . | x | x |
hp | -.74 | . | x |
disp | -.77 | .67 | . |