cv04_histogram_kde {CleaningValidation}R Documentation

Plot Histogram with Kernel Density Estimate Curve

Description

This function takes a dataset and a column representing the residue percentages and generates a histogram overlaid with a KDE (Kernel Density Estimate) curve. It calculates and marks quantiles P0.5, P0.8413, P0.9772, and the P0.99865, i.e., UCL (Upper Control Limit) on the plot.

Usage

cv04_histogram_kde(data, residue_pct_col)

Arguments

data

A dataframe containing the relevant dataset.

residue_pct_col

The name of the column in 'data' that contains the residue percentages.

Value

A ggplot object representing the histogram with KDE curve.

Author(s)

Chan, Mohamed, Lou, Wendy, Yang, Xiande [xiande.yang at gmail.com]

Examples

Eq_DAR <- cv03_usl_unification(data=Eq_DAR,"CleaningEvent", "DAR", usl_col="USL")
cv04_histogram_kde(data = Eq_DAR, residue_pct_col = "DAR_Pct")

[Package CleaningValidation version 1.0 Index]