cor_sort {correlation} | R Documentation |
Sort a correlation matrix to improve readability of groups and clusters
Description
Sort a correlation matrix based on hclust()
.
Usage
cor_sort(x, distance = "correlation", hclust_method = "complete", ...)
Arguments
x |
A correlation matrix. |
distance |
How the distance between each variable should be calculated.
If |
hclust_method |
Argument passed down into the |
... |
Other arguments to be passed to or from other functions. |
Examples
x <- correlation(mtcars)
cor_sort(as.matrix(x))
cor_sort(x, hclust_method = "ward.D2") # It can also reorder the long form output
cor_sort(summary(x, redundant = TRUE)) # As well as from the summary
[Package correlation version 0.8.5 Index]