I made a grouped bar chart but I want the groups organized from lowest value for a variable to highest value.
The dataframe "habitat" consists of columns of "ï..Species", "RCP85Habitat", and "RCP26Habitat" Here's my code:
habitat.m <- melt(habitat, id.vars='ï..Species')
plot.habitat<-ggplot(habitat.m, aes(ï..Species, value)) +
geom_bar(aes(fill = variable), position = "dodge", stat="identity")
Any suggestions on how I get species to be displayed from lowest value of variable RCP85 to the highest value?