Learn R Programming

LDLcalc (version 2.1)

PlotDiscrHist: Plot discrete histogram

Description

Plot discrete histogram (barplot) of the data frame column named in the param argument. It also plots the mean as a vertical continuous line, the mean plus/minus 2 standard deviations as veritcal dotted lines and overlays a density plot of the normal distribution with mean and standard deviation corresponding to those of the data.

Usage

PlotDiscrHist(DF, param, title = "")

Value

It returns a ggplot object.

Arguments

DF

A data frame containing columns whose discrete histogram is to be plotted.

param

The column name of the columns for which to plot the discrete histogram.

title

Title of the plot (default="").

Examples

Run this code
if (FALSE) {
PlotDiscrHist(sampleA,"LDL")
}

Run the code above in your browser using DataLab