save_correlation_matrix: Creates and save to file a fully formatted correlation...

View source: R/save_correlation_matrix.R

save_correlation_matrixR Documentation

Creates and save to file a fully formatted correlation matrix, using correlation_matrix and Hmisc::rcorr in the backend

Description

Creates and save to file a fully formatted correlation matrix, using correlation_matrix and Hmisc::rcorr in the backend

Usage

save_correlation_matrix(df, filename, ...)

Arguments

df

dataframe; passed to correlation_matrix

filename

either a character string naming a file or a connection open for writing. "" indicates output to the console; passed to write.csv

...

any other arguments passed to correlation_matrix

Value

'csv' file. No value is returned.

Examples


save_correlation_matrix(df = iris,
                        filename = 'iris-correlation-matrix.csv')

save_correlation_matrix(df = mtcars,
                        filename = 'mtcars-correlation-matrix.csv',
                        digits = 3,
                        use = 'lower')
                        

corrtable documentation built on Nov. 3, 2023, 1:11 a.m.