corrBarplot {corrViz}R Documentation

corrBarplot

Description

This function creates a either a static or interactive bar plot of correlations between variables in a dataset.

Usage

corrBarplot(
  mat,
  interactive = TRUE,
  pal = colorRampPalette(c("cornflowerblue", "white", "tomato"))(100)
)

Arguments

mat

A square correlation matrix to visualise.

interactive

A logical value specifying whether to create an interactive ggplotly plot, default is TRUE

pal

A colour palette for the bar plot, default is colorRampPalette(c("cornflowerblue", "white", "tomato"))(100).

Details

Creates a static or interactive bar plot displaying correlation values. By hovering mouse over a bar, the variables and correlation value is shown.

Value

A static or interactive bar plot displaying correlations.

Examples

cm <- cor(mtcars)

corrBarplot(mat = cm,
           interactive = TRUE)



[Package corrViz version 0.1.0 Index]