as_cordf: Coerce lists and matrices to correlation data frames

View source: R/utility.R

as_cordfR Documentation

Coerce lists and matrices to correlation data frames

Description

A wrapper function to coerce objects in a valid format (such as correlation matrices created using the base function, cor) into a correlation data frame.

Usage

as_cordf(x, diagonal = NA)

Arguments

x

A list, data frame or matrix that can be coerced into a correlation data frame.

diagonal

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

Value

A correlation data frame

Examples

x <- cor(mtcars)
as_cordf(x)
as_cordf(x, diagonal = 1)

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