This function turns the correlation matrix returned by cor_matrix()
and
its relatives into a tidy dataframe. Note that by default, results for both the cor(A, B)
and cor(B, A)
are returned, while entries for A, A
, i.e. the values on the diagonal,
are never included.
# S3 method for class 'cor_matrix'
tidy(x, both_directions = TRUE, ...)
A cor_marix
object returned from
cor_matrix()
Should both cor(A, B)
and cor(B, A)
be returned. Defaults to TRUE
.
Additional arguments. Not used. Needed to match generic signature only.
A tibble::tibble()
with columns:
Name of the first variable
Name of the second variable
The estimated value of the correlation
The t-statistic used for significance testing
The two-sided p-value of the correlation
Number of observations used to compute the correlation
Lower bound of confidence interval. Width is determined in call to cor_matrix()
Upper bound of confidence interval. Width is determined in call to cor_matrix()