metric_plot_helper: Helper Function for Plotting the Distribution of a Metric

View source: R/helpers.R

metric_plot_helperR Documentation

Helper Function for Plotting the Distribution of a Metric

Description

Helper Function for Plotting the Distribution of a Metric

Usage

metric_plot_helper(
  cmps_metric,
  metric,
  scaled = FALSE,
  SSratio = TRUE,
  plot_density = TRUE,
  ...
)

Arguments

cmps_metric

a data frame containing values of the metric and the labels

metric

string. Which metric to be plotted

scaled

logical value. If scaled = TRUE, the values should be within the interval of [0, 1]

SSratio

logical value. Whether to show the sum of squares ratio value

plot_density

logical value. If plot_density = TRUE, the function plots group density on the y-axis; if plot_density = FALSE, it plots the count of a certain bin.

...

other arguments for plotting: breaks, binwidth, and subtitle

Value

a ggplot object


cmpsR documentation built on July 18, 2022, 9:07 a.m.