as_cordf {corrr} | R 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)
[Package corrr version 0.4.4 Index]