summarise.cor_list: Summarize Correlation List

Description Usage Arguments Details See Also Examples

Description

Summarize method for the cor_list class.

Usage

1
2
## S3 method for class 'cor_list'
summarise(.data, x = everything(), y = everything(), sort = TRUE, ...)

Arguments

.data

An object of class cor_list.

x

Variables to include/exclude from one side of the correlation. You can use the same specifications as in select. If missing, defaults to all variables.

y

Variables to include/exclude from the other side of the correlation. You can use the same specifications as in select. If missing, defaults to all variables.

sort

Logical value indicating whether the output should be sorted. If TRUE (the default), output will be sorted by the absolute value of the correlation coefficients (in descending order). If FALSE, output will appear in the same order as the columns of the matrix or data frame passed to cor.

...

further arguments passed to or from other methods.

Details

The summarize method for the cor_list class allows for interactive exploration of correlation results. Use select_helpers expressions to return specific bivariate relationships that you want to look at.

See Also

cor_boot, cor_list, select, select_helpers,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Create a correlation list for the numeric variables from the iris data set
iris_cors <- cor_list(iris[,-5])

# Look at all correlations with Sepal.Length
summarize(iris_cors, x = Sepal.Length)

# Look at all correlations between sepal measurements and petal measurements
summarize(iris_cors, x = starts_with("Sepal"), y = starts_with("Petal"))

# Look at all correlations with Sepal.Length, excluding Sepal.Width
summarize(iris_cors, x = Sepal.Length, y = -Sepal.Width)

# Look at all correlations in their original order
summarize(iris_cors, sort = FALSE)

jashu/corxplor documentation built on Dec. 10, 2019, 7:09 p.m.