R Receiving Errors When Trying To Use Stat Function In Ggplot Stack

R Receiving Errors When Trying To Use Stat Function In Ggplot Stack