Description Usage Arguments Value See Also Examples
Compute the correlation or the Cramér's V measure of association.
1 2 | compute_cor(x, y = NULL, method = c("pearson", "kendall", "spearman",
"cramer"), n_jobs = 1, ...)
|
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 |
A numeric value if x
and y
are vectors or a matrix if
x
is a matrix or a data frame.
1 2 3 | compute_cor(mtcars)
compute_cor(mtcars, method = "spearman")
compute_cor(tea$price, tea$home, method = "cramer")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.