I am a newbie in R and try to adapt some ggplot graphs with the new version. I can't solve the depreciation syntax about a bar graph and a boxplot.
Thanks for your help
The first one :
# colors
cols = c("#7CAE00", "#00BFC4", "#F8766D", "#C77CFF")
names(cols) = c("beer", "coffee", "soda", "wine")
# boxplot
ggplot(scores, aes(x=drink, y=score, group=drink)) +
geom_boxplot(aes(fill=drink)) +
scale_fill_manual(values=cols) +
geom_jitter(colour="gray40",
position=position_jitter(width=0.2), alpha=0.3) +
opts(title = "Boxplot - Drink's Sentiment Scores")
And the second :
ggplot(drink_neg, aes(y=mean_neg)) +
geom_bar(data=drink_neg, aes(x=drinks, fill=drinks)) +
scale_fill_manual(values=cols[order(drink_neg$mean_neg)]) +
opts(title = "Average Very Negative Sentiment Score",
legend.position = "none")