save_correlation_matrix {corrtable}R 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')
                        

[Package corrtable version 0.1.1 Index]