Is there any way to create subgroups for stacked bar charts in R? Below is an example of what I'm aiming for.
Example of What I'm Aiming to Plot
I'm currently using the below code - but I can't figure out how to sub-group the samples (identified by the ID column) by their larger arching group (Sample Site)
ggplot(PFASData, aes(fill=Species, y=value, x=ID)) + geom_bar(position="stack", stat="identity")