corrSankey {corrViz} | R Documentation |
Create an interactive Sankey diagram to visualize correlations
corrSankey(mat, threshold = 0, colour = FALSE)
mat |
A square correlation matrix to visualise. |
threshold |
A numeric value indicating the minimum absolute correlation value to include in the diagram. Default is 0 (include all correlations). |
colour |
A logical value indicating whether to color the links based on positive or negative correlation. Default is FALSE (links are grey). |
This function generates a Sankey diagram for a given data frame, correlation method, and correlation threshold, with an optional colour parameter.
A plotly Sankey diagram object.
cm <- cor(mtcars)
corrSankey(mat = cm, threshold = 0.6)
corrSankey(mat = cm, threshold = 0.8, colour = TRUE)