corrr (version 0.4.0)

as_matrix: Convert a correlation data frame to matrix format

Description

Convert a correlation data frame to original matrix format.

Usage

as_matrix(x, diagonal)

Arguments

x

A correlation data frame. See correlate or as_cordf.

diagonal

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

Value

Correlation matrix

Examples

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

Run the code above in your browser using DataLab