View source: R/prepapre_correlation_table.R
prepare_correlation_table | R Documentation |
Reads a data frame and presents Pearson correlations above the diagonal and Spearman correlations below.
prepare_correlation_table(df, digits = 2, bold = 0.05, format = "html", ...)
df |
Data frame containing at least two variables that are either numeric or logical and at least five observations. |
digits |
The number of digits that you want to report. |
bold |
Indicate the p-Value for for identifying significant correlations in bold print. Defaults to 0.05. If set to 0, no bold print is being used. |
format |
The format that you want |
... |
Additional parameters that are passed on to |
A list containing four items:
A data frame containing the correlations
A data frame containing the p-values of the correlations
A data frame containing the number of observations used for the correlations
The return value provided by kable
containing the formatted table
t <- prepare_correlation_table(mtcars)
t$df_corr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.