Produces data frame of correlations with stars standing for significance Create Correlation Table with Significance Stars
Creates a formatted correlation matrix with optional significance stars. Handles tibble inputs and provides flexible output formats.
Arguments
- d
A data frame or tibble containing numeric variables
- method
Character string indicating correlation method. One of "pearson", "kendall", or "spearman" (default)
- star
Logical. If TRUE (default), adds significance stars to correlations
- raw
Logical. If TRUE, returns raw correlation matrix without formatting
Value
A matrix containing formatted correlations with significance stars (if requested) or raw correlation values
Examples
if (FALSE) { # \dontrun{
data <- data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100))
cor_table(data) # With stars
cor_table(data, star = FALSE) # Without stars
cor_table(data, raw = TRUE) # Raw correlations
cor_table(data, method = "pearson") # Pearson method
} # }
