# Prepare statistical objects
test_corr <- correlation::correlation(mtcars, select = "mpg", select2 = "disp")
test_corr2 <- correlation::correlation(mtcars, select = "mpg", select2 = "disp", method = "kendall")
# Format correlation
format_stats(test_corr)
# Remove confidence intervals and italics
format_stats(test_corr, full = FALSE, italics = FALSE)
# Change digits and add leading zero to p-value
format_stats(test_corr, digits = 3, pdigits = 4, pzero = TRUE)
# Format Kendall's tau for LaTeX
format_stats(test_corr2, type = "latex")
Run the code above in your browser using DataLab