I am using R with ggplot and I am struggling with sorting in the desired order a grouped barchart.
The code used so far is the following:
levels(data.m$variable) <- c("% Worried about emigration", "% Worried both immigration and emigration",
"% Worried about immigration", "% Neither / don't know")
require(forcats)
ggplot(data.m, aes(fill = variable, Countries, value))+
geom_bar(position = 'stack', stat = 'identity')+
expand_limits(x=c(0,0))+
coord_flip()
That returns me this chart:
However, I would like to have y-axis of this chart sorted by the countries that are more worried about "Emigration".
Could somebody help me out with this?