corrr (version 0.4.4)

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)

Value

Correlation matrix

Arguments

x

A correlation data frame. See correlate or as_cordf.

diagonal

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

Examples

Run this code
x <- correlate(mtcars)
as_matrix(x)

Run the code above in your browser using DataLab