as_matrix: Convert a correlation data frame to matrix format

View source: R/utility.R

as_matrixR Documentation

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

x <- correlate(mtcars)
as_matrix(x)

corrr documentation built on Aug. 17, 2022, 1:05 a.m.