plot_relative_freq_histogram {creditmodel}R Documentation

Plot Relative Frequency Histogram

Description

You can use the plot_relative_freq_histogram to produce the relative frequency histogram plots.

Usage

plot_relative_freq_histogram(
  dat,
  x,
  y = NULL,
  x_breaks = NULL,
  y_breaks = NULL,
  value = NULL,
  reverse = ifelse(is.null(y), TRUE, FALSE),
  g_x = 10,
  g_y = 5,
  cut_bin = "equal_width",
  pl_theme = plot_theme(legend.position = "top", title_size = 9, legend_size = 7,
    axis_title_size = 8),
  fill_colors = c(love_color(type = "lightnihon_6x1"), love_color(type = "deep"),
    love_color(type = "light")),
  string_bins = FALSE
)

Arguments

dat

A data.frame with independent variables and target variable.

x

The name of an independent variable.

y

The name of target variable. Default is NULL.

x_breaks

Breaks points of x.

y_breaks

Breaks points of y.

value

The name of the variable to sum. When this parameter is NULL, the default statistics is to sum frequency.

reverse

Logical,whether reverse the plot.

g_x

Number of initial breakpoints for equal frequency binning of x.

g_y

Number of initial breakpoints for equal frequency binning of y.

cut_bin

'equal_width' or 'equal_depth' to produce the breaks points.

pl_theme

Theme of plot.

fill_colors

Colors of bar.

string_bins

Whether to process bins of classification variables.

Examples

plot_relative_freq_histogram(dat = lendingclub, x = "grade", y = "dti", g_x = 7,g_y = 3,
	cut_bin = 'equal_width')

[Package creditmodel version 1.3.0 Index]