Learn R Programming

lares (version 4.1)

corr_var: Correlation between variable and dataframe

Description

This function correlates a whole dataframe with a single feature.

Usage

corr_var(df, var, method = "pearson", plot = TRUE, logs = TRUE,
  top = NA, zeroes = FALSE)

Arguments

df

Dataframe.

var

Character. Name of the variable to correlate

method

Character. Any of: c("pearson", "kendall", "spearman")

plot

Boolean. Do you wish to plot the result?

logs

Boolean. Automatically calculate log(values) for numerical variables (not binaries)

top

Integer. If you want to plot the top correlations, define how many

zeroes

Do you wish to keep zeroes in correlations too?