I have a grouped boxplot using data with 3 categories. One category is defined as the x axis of the boxes, the other is set as the fill, and the last as the cut category. I want to display the funds for each fill group, but using stat_summaryonly the average value for the category along the x-axis, without dividing the funds for the fill:

Here is the current code:
demoplot<-ggplot(demo,aes(x=variable,y=value))
demoplot+geom_boxplot(aes(fill=category2),position=position_dodge(.9))+
stat_summary(fun.y=mean, colour="black", geom="point", shape=18, size=4,) +
facet_wrap(~category1)
Is there a way to show the average for each category2 without having to manually calculate and plot the graph? Adjusting the dodging position does not really help, since this is just one calculated average. Is it possible to create conditions inside a function mean()?
For anyone interested, here are the data:
.