powered by
This function creates a either a static or interactive bar plot of correlations between variables in a dataset.
corrBarplot( mat, interactive = TRUE, pal = colorRampPalette(c("cornflowerblue", "white", "tomato"))(100) )
A static or interactive bar plot displaying correlations.
A square correlation matrix to visualise.
A logical value specifying whether to create an interactive ggplotly plot, default is TRUE
A colour palette for the bar plot, default is colorRampPalette(c("cornflowerblue", "white", "tomato"))(100).
Creates a static or interactive bar plot displaying correlation values. By hovering mouse over a bar, the variables and correlation value is shown.
cm <- cor(mtcars) corrBarplot(mat = cm, interactive = TRUE)
Run the code above in your browser using DataLab