corrSankey {corrViz}R Documentation

corrSankey

Description

Create an interactive Sankey diagram to visualize correlations

Usage

corrSankey(mat, threshold = 0, colour = FALSE)

Arguments

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).

Details

This function generates a Sankey diagram for a given data frame, correlation method, and correlation threshold, with an optional colour parameter.

Value

A plotly Sankey diagram object.

Examples

cm <- cor(mtcars)
corrSankey(mat = cm, threshold = 0.6)
corrSankey(mat = cm, threshold = 0.8, colour = TRUE)


[Package corrViz version 0.1.0 Index]