I have the following count plot in R
mpg %>%
ggplot2::ggplot(ggplot2::aes(x = as.character(class))) +
ggplot2::geom_bar(fill = '#00798c') +
ggplot2::geom_text(stat = "count", ggplot2::aes(label = after_stat(count)), position = ggplot2::position_dodge(width = 0.8), vjust = -0.3)
How can I reorder the bars to be by descending counts?
I'm not sure if I can use the
reorder() function here because there isn't a specific variable for the count. Or am I missing something?

