compute_cor: Correlation and Cramér's V

Description Usage Arguments Value See Also Examples

Description

Compute the correlation or the Cramér's V measure of association.

Usage

1
2
compute_cor(x, y = NULL, method = c("pearson", "kendall", "spearman",
  "cramer"), n_jobs = 1, ...)

Arguments

x

A character vector, matrix or data frame.

y

NULL (default) or a vector if x is a vector.

method

a character string indicating which method to use. One of "pearson" (default), "kendall", "spearman" or "cramer".

n_jobs

numeric, the number of thread(s) to use (1 by default). NB: n_jobs is not yet implemented.

...

parameters to pass to cor

Value

A numeric value if x and y are vectors or a matrix if x is a matrix or a data frame.

See Also

plot_cor

Examples

1
2
3
compute_cor(mtcars)
compute_cor(mtcars, method = "spearman")
compute_cor(tea$price, tea$home, method = "cramer")

thoera/corr documentation built on May 8, 2019, 11:59 p.m.