library(modelsummary)
dat <- mtcars[, c("mpg", "hp", "disp")]
cor_fun <- function(x) {
out <- cor(x, method = "kendall")
datasummary_correlation_format(
out,
fmt = 2,
upper_triangle = "x",
diagonal = ".")
}
datasummary_correlation(dat, method = cor_fun)
Run the code above in your browser using DataLab