Skip to contents

Core Functions

Compute correlations with automatic method selection.

smart_cor()
Choose and Compute a Correlation
smart_cor_df()
Correlation Matrix as Plain Data Frames
smart_cormat()
Build a Mixed-Type Correlation Matrix

Method Comparison

Compare all applicable methods for a variable pair.

compare_methods()
Run Every Applicable Method on One Pair

Diagnostics

Check outliers, normality, latent normality, and linearity for method selection.

detect_outliers() print(<smartcor_outliers>)
Flag Outliers with the Outer-Fence Rule
test_bivariate_normality()
Test Bivariate Normality for a Pair of Variables
test_linearity()
Test Linearity Using Ordered Regression Residuals

Helpers

Inspect variable types and available methods.

detect_type()
Detect the Statistical Type of a Variable
available_methods()
Which Methods Apply to a Pair of Variable Types

Tidy Output

Convert results to tidy data frames.

tidy(<smartcor>)
Tidy a smartcor Object
tidy(<smartcormat>)
Tidy a smartcormat Object
tidy(<smartcor_comparison>)
Tidy a smartcor Comparison

Plotting (Base R)

Visualise correlation matrices with base graphics.

plot(<smartcormat>) plot_cor_heatmap()
Plot a Correlation Heatmap

Plotting (ggplot2)

Publication-quality visualisations with ggplot2.

ggcor_heatmap() ggcor_method_heatmap()
ggplot2 Heatmaps for Smart Correlation Matrices
print(<smartcor>)
Print a smartcor Object
print(<smartcormat>)
Print a smartcormat Object
print(<smartcor_comparison>)
Print a Method Comparison
print(<smartcor_normtest>)
Print a Normality Test
print(<smartcor_lintest>)
Print a Linearity Test