arrange bar plot descending r ggplot code example
Example 1: sort in descending order in r
#sort by mpg (ascending) and cyl (descending)
newdata <- mtcars[order(mpg, -cyl),]
Example 2: ggplot2 barplot order of bars
theTable$Position <- factor(theTable$Position, levels = c(...))