How to create a stacked bar chart with 2 numeric variables in R using ggplot, grouped by 1 factor variable?
问题 I'm fairly new to R and this is my first question on here so apologies if I write it in a confusing way! Basically I have a dataframe with 4 columns, month and site which are factors, and organic % and inorganic % which are numeric: df<-data.frame(month = c("Mar", "Apr", "May", "Jun", "Jul", "Mar", "Apr", "May", "Jun", "Jul"), site = c("Borth", "Borth", "Borth", "Borth", "Borth", "Clarach", "Clarach", "Clarach", "Clarach", "Clarach"), organic = c(10,20,30,40,50), inorganic = c(90,80,70,60,50)