Calculate correlation for selected variables in groups

correlations_per_group(.data, ..., group_var = NULL)

Arguments

.data

Data frame containing the data.

...

Variable names (quoted or unquoted) to calculate the correlation for.

group_var

Variable used to divide data into categories. Default value is NULL.

Value

Data frame containing correlations summaries.

Examples

df_corrs <- correlations_per_group(mtcars, wt, qsec, group_var = cyl)