norm_dist_plot {describedata}R Documentation

Create density histogram with normal distribution overlaid

Description

Plots a simple density histogram for a continuous variable with a normal distribution overlaid. The overlaid normal distribution has the same mean and standard deviation as the provided variable, and the plot provides a visual means to assess the normality of the variable's distribution.

Usage

norm_dist_plot(df, vars)

Arguments

df

A data.frame or tibble.

vars

A character vector of continuous variable names.

Value

A ggplot object.

Examples

norm_dist_plot(df = iris, vars = "Sepal.Width")

norm_dist_plot(df = iris,
               vars = c("Sepal.Width", "Sepal.Length"))

[Package describedata version 0.1.0 Index]