auto_cor | R Documentation |
Finds the correlation between numeric variables in a data frame, chosen using tidyselect.
Additional parameters for the correlation test can be specified as in cor.test
auto_cor( .data, ..., use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything", "na.or.complete"), method = c("pearson", "kendall", "spearman", "xicor"), include_nominals = TRUE, max_levels = 5L, sparse = TRUE, pval_thresh = 0.1 )
.data |
data frame |
... |
tidyselect cols |
use |
method to deal with na. Default is to remove rows with NA |
method |
correlation method. default is pearson, but also supports xicor. |
include_nominals |
logicals, default TRUE. Dummify nominal variables? |
max_levels |
maximum numbers of dummies to be created from nominal variables |
sparse |
logical, default TRUE. Filters and arranges cor table |
pval_thresh |
threshold to filter out weak correlations |
includes the asymmetric correlation coefficient xi from xicor
data frame of correlations
iris %>% auto_cor() # don't use sparse if you're interested in only one target variable iris %>% auto_cor(sparse = FALSE) %>% dplyr::filter(x == "Petal.Length")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.