R Function With Ggplot2 Ordered Barplot Error In Eval Expr Envir

R Function With Ggplot2 Ordered Barplot Error In Eval Expr Envir