R Passing A Function To The Ggplot Density Plot Stack

R Passing A Function To The Ggplot Density Plot Stack