Learn R Programming

corrr (version 0.1.0)

as_matrix: Convert cor_df to original matrix.

Description

Convert a correlation data frame to original matrix format.

Usage

as_matrix(x, diagonal)

Arguments

x

cor_df. See correlate.

diagonal

Value (typically numeric or NA) to set the diagonal to. Default = 1.

Value

Correlation matrix

Examples

Run this code
# NOT RUN {
x <- correlate(mtcars)
as_matrix(x)
# }

Run the code above in your browser using DataLab