I'd like to convert the frequency of words to the percentage of words. This in my code:
text %>%
inner_join(get_sentiments("bing")) %>%
group_by(index = file, file, sentiment) %>%
summarize(n = n()) %>%
ggplot(aes(x = index, y = n, fill = file)) +
geom_bar(stat = "identity", alpha = 0.8) +
facet_wrap(~ sentiment, ncol = 5) `
I've tried adding scale_y_countinous
, but I can't seem to make any meaningful graph.
Thanks!