corrNetwork {corrViz} | R Documentation |
corrNetwork
Description
Creates an interactive Correlation Network Visualization
Usage
corrNetwork(
mat,
threshold = 0,
layout = "layout_nicely",
width = "100%",
height = "400px",
physics = TRUE
)
Arguments
mat |
A square correlation matrix to visualise. |
threshold |
A numeric value indicating the minimum absolute correlation value to display in the plot. |
layout |
Any |
width |
The width of the viewing window. |
height |
The height of the viewing window. |
physics |
A logical value indicating whether to use physics-based layout. Default is TRUE. |
Details
Each node in the network represents a variable where the width of the connecting edges represent the absolute value of the correlation. Positive correlations have red coloured edges whereas negative correlations have blue coloured edges.
Value
A network plot displaying correlations.
Examples
ci <- cor(iris[1:4])
corrNetwork(mat = ci, threshold = 0.5)
# Another example
cm <- cor(mtcars)
corrNetwork(mat = cm,
threshold = 0.8,
layout = 'layout_on_grid',
physics = FALSE)
[Package corrViz version 0.1.0 Index]