Learn R Programming

lares (version 4.1)

plot_distr: Plot Target's Distribution vs Another Variable

Description

Study the distribution of a target variable vs another variable. This function is quite similar to the funModeling's corrplot function.

Usage

plot_distr(data, target, values, top = 10, breaks = 10,
  custom_colours = FALSE, abc = FALSE, na.rm = FALSE,
  print = FALSE, save = FALSE, subdir = NA)

Arguments

data

Dataframe

target

Character. Name of the Main -target- variable

values

Character. Name of the Secondary variable

top

Integer. Filter and plot the most n frequent for categorical values

breaks

Integer. Number of splits for numerical values

custom_colours

Boolean. Use custom colours function?

abc

Boolean. Do you wish to sort by alphabetical order?

na.rm

Boolean. Ignore NAs if needed

print

Boolean. Print the table's result

save

Boolean. Save the output plot in our working directory

subdir

Character. Into which subdirectory do you wish to save the plot to?