Skip to content

thoera/corr

Repository files navigation

corr

Overview

corr aims to provide a consistent interface to compute several types of correlation coefficient and Cramér's V measure of association. It offers an easy way to visualize the results with heatmaps.

corr fits naturally in the tidyverse and is "pipe-friendly".

Installation

To install the package, simply run the following from an R console:

# install.packages("remotes")
remotes::install_github("thoera/corr")

Usage

library("corr")

# compute the correlation
results <- compute_cor(mtcars, method = "pearson")

# view the results 
plot_cor(results, value = TRUE)

# corr is "pipe-friendly"
library("tidyverse")

starwars %>%
  select_if(is.character) %>%
  select(-name) %>%
  filter(complete.cases(.)) %>%
  compute_cor(method = "cramer") %>%
  plot_cor(type = "lower",
           value = TRUE,
           limits_scale = c(0, 1),
           title_legend = "Cramér's V:")

Example

With the mtcars dataset:

examples.png

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages