calc_cor: Evaluates the correlation between the numeric columns of a...

Description Usage Arguments Value Examples

View source: R/eda.R

Description

Evaluates the correlation between the numeric columns of a given dataframe.

Usage

1
calc_cor(df, num_vars)

Arguments

df

The dataframe to be inspected.

num_vars

A list of strings of column names containing numeric variables.

Value

ggplot object; a correlation matrix plot labelled with the correlation coefficients of -1 to 1 between each numeric column and other numeric columns in the dataframe.

Examples

1
2
3
df <- data.frame(x = (c(2,3,4)), y= c(1,10,3))
col_num <- c("x", "y")
calc_cor(df, col_num)

UBC-MDS/edar documentation built on April 2, 2020, 3:57 a.m.