I'm doing a word frequency analysis. I've got data that look like this:
word freq
get 1672
just 1639
good 1402
like 1227
know 1175
day 1150
new 110
my ggplot2 code is this:
ggplot('data', aes(x= word, y= freq)) +
geom_bar(stat="identity") +
coord_flip() +
labs(x = NULL, y = "Frequency") +
labs(title="Twitter ")
This plot works, no error messages. I would like to plot the words in order of decreasing frequency, with "get", "just" . . . "new". How to change my code to do this?