plot_ridge_distribution: Plot Ridge Distributions

View source: R/plot_ridge_distribution.R

plot_ridge_distributionR Documentation

Plot Ridge Distributions

Description

Creates a distribution plot of several numeric variables side by side for comparison.

Usage

plot_ridge_distribution(
  df,
  numeric_cols,
  name_groups = NULL,
  name_units = NULL,
  grouping = NULL,
  file_path = NULL,
  wdth = NULL,
  hght = NULL,
  title_name = NULL
)

Arguments

df

Inputs a dataframe.

numeric_cols

Inputs a character vector specifying column names of the numeric variables to plot.

name_groups

Inputs an optional character value specifying the names of the groups.

name_units

Inputs an optional character value specifying the names of the units.

grouping

Inputs an optional character value specifying the name of a column by which to facet the plot.

file_path

Inputs an optional character value specifying the file path location to save an image of the plot. Recommended to specify as a .jpg or .png file.

wdth

Inputs an optional numeric value for the width of the image.

hght

Inputs an optional numeric value fo the height of the image.

title_name

Inputs an optional character value for the title of the plot.

Value

Returns a ggplot2 object.

Examples

## Not run: plot_ridge_distribution(df, numeric_cols = c("fcs_cereal", "fcs_dairy", ...),
name_groups = "Food Groups", name_units = "Days", grouping = "enum")
## End(Not run)

SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.