pair_cor: Pearson, Spearman or Kendall correlation

View source: R/pair_methods.R

pair_corR Documentation

Pearson, Spearman or Kendall correlation

Description

Calculates one of either pearson, spearman or kendall correlation for every numeric variable pair in a dataset.

Usage

pair_cor(d, method = "pearson", handle.na = TRUE, ...)

Arguments

d

A dataframe

method

A character string for the correlation coefficient to be calculated. Either "pearson" (default), "spearman", or "kendall". If the value is "all", then all three correlations are calculated.

handle.na

If TRUE uses pairwise complete observations to calculate correlation coefficient, otherwise NAs not handled.

...

other arguments

Value

A tibble of class pairwise with calculated association value for every numeric variable pair, or NULL if there are not at least two numeric variables

See Also

See pair_methods for other score options.

Examples

pair_cor(iris)
pair_cor(iris, method="kendall")
pair_cor(iris, method="spearman")
pair_cor(iris, method="all")

bullseye documentation built on Sept. 11, 2024, 9:24 p.m.