I need to reorder a barplot from high to low (left to right) using ggplot & aes_string(). For e.g. for a dataframe df <- f(X,Y,Z) this can be done with
g
With the latest version of ggplot, you should be use aes with !! and sym() to turn your strings into symbols.
aes
!!
sym()
ggplot(top10, aes( x = reorder(!!sym(colnames(top10)[num1]), meanFeat), y = meanFeat, fill=!!sym(colnames(top10)[num1]))) + geom_bar(stat="identity")