How the distance between each variable should be calculated.
If correlation (default; suited for correlation matrices), the matrix
will be rescaled to 0-1 (distance = 0 indicating correlation of 1;
distance = 1 indicating correlation of -1). If raw, then the matrix
will be used as a distance matrix as-is. Can be others (euclidean,
manhattan, ...), in which case it will be passed to dist() (see the
arguments for it).
hclust_method
Argument passed down into the method argument of hclust().
...
Other arguments to be passed to or from other functions.
x <- correlation(mtcars)
cor_sort(as.matrix(x))
cor_sort(x, hclust_method = "ward.D2") # It can also reorder the long form outputcor_sort(summary(x, redundant = TRUE)) # As well as from the summary