Plots a density plot using ggplot2.

density_plot(data, variable, title = NULL, xlab = NULL, ylab = "Density")

Arguments

data

The dataset that contains the variable to be plotted

variable

The variable to be plotted

title

The title of the figure. By default set to NULL.

xlab

The x label of the figure. By default set to NULL.

ylab

The y label of the figure. By default set to "Density".