corr_matrix: Calculates Pearson correlation coefficients for all numeric...

Description Usage Arguments Value Examples

View source: R/collinearityR.R

Description

Calculates Pearson correlation coefficients for all numeric variables. Rounds the outcome to desired decimals. Outputs a matrix or a dataframe (longer matrix)

Usage

1
corr_matrix(df, decimals = 2)

Arguments

df

tibble, the input dataframe

decimals

int, the number of decimals

Value

a generic correlation matrix and its longer form that can be passed to other functions in this package.

Examples

1
corr_matrix(tibble::tibble(x = 1:5, y = 2:6))

UBC-MDS/collinearityR_tool documentation built on Feb. 6, 2022, 9:41 p.m.