Explore correlations with bar charts
Installation
Development version from GitHub:
GitHub: https://github.com/zpio/ggexplorer
Show/Hide code
::install_github("zpio/ggexplorer") remotes
Show/Hide code
library(ggexplorer)
Examples
Mtcars dataset
Show/Hide code
library(dplyr)
<- mtcars %>% mutate(dplyr::across(c(am, carb, cyl, gear, vs), as.factor))
mtcars mtcars
Basic Chart
Show/Hide code
plotCorrelate(mtcars)
Method
Show/Hide code
plotCorrelate(mtcars, method = "kendall")
Width
Show/Hide code
plotCorrelate(mtcars, width = 0.5)
Colors
Show/Hide code
plotCorrelate(mtcars, palette_gradient = 'Orange-Blue Diverging')
See Details for available palettes (ordered-diverging):
https://jrnold.github.io/ggthemes/reference/tableau_color_pal.html
Interactive
Show/Hide code
plotCorrelate(mtcars, interactive = TRUE, label_show = FALSE,
palette_gradient = 'Green-Blue-White Diverging')