Skip to contents

Plotting distributions by group variables.

Usage

plot_dist(data, metric_var, group_var, plot_type = "both")

Arguments

data

Input data.frame.

metric_var

character indicating metric variable whose distribution is displayed.

group_var

character indicating categorical variable that is used to group the metric variable visually.

plot_type

character indicating type of plot, either "ridge_plot" or "box_plot". Default is "ridge_plot".

Value

A ggplot object.