library(dplyr)
library(ggplot2)
library(forcats)
loadouts |>
count(item) |>
mutate(item = fct_reorder(item, n, max)) |>
ggplot(aes(item, n)) +
geom_col() +
geom_text(aes(item, n + 3, label = n)) +
coord_flip()
Run the code above in your browser using DataLab