May 5, 2023, 3:55 a.m. | Brendan Mapes

Towards Data Science - Medium towardsdatascience.com

Painless and tidyverse-friendly correlational analysis using rstatix

Photo by Armand Khoury on Unsplash

Correlational analysis is one of the most basic and foundational ways to explore the relationship between two or more variables. You may have already performed correlational analysis at some point using R, and it might have looked something like this:

cor_results <- cor.test(my_data$x, my_data$y,
method = "pearson")

cor_results

With an output looking like:

This is the base R way to run a simple correlation for two variables …

correlation data science exploratory-data-analysis statistics

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Global Data Architect, AVP - State Street Global Advisors

@ State Street | Boston, Massachusetts

Data Engineer

@ NTT DATA | Pune, MH, IN