tidy_correlation | R Documentation |
This function respects groupings from dplyr::group_by()
. When the dataframe
contains grouped data, the correlations are computed within each subgroup of
data.
tidy_correlation(data, ..., type = c("pearson", "spearman"))
data |
a dataframe |
... |
columns to select, using |
type |
type of correlation, either |
a long dataframe (a tibble) with correlations calculated for each pair of columns.
tidy_correlation(ChickWeight, -Chick, -Diet) tidy_correlation(ChickWeight, weight, Time) ChickWeight %>% dplyr::group_by(Diet) %>% tidy_correlation(weight, Time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.