Density plots and histograms

Using retinol data
{ggplot2}

qplot (cholesterol, data=retinol, geom="histogram", binwidth=20)



qplot (cholesterol, data=retinol, geom="density")

Splitting density plots and histograms by different categories of a selected variable 
qplot (cholesterol, data=retinol, geom="density", colour=tabac)

qplot (cholesterol, data=retinol, geom="histogram", binwidth=20, fill=tabac)

Introduction to the Analysis of Survival Data in the Presence of Competing Risks

 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4741409/