How may I add the amount of variables (e.g. n=5) of each data.frame on the x-axes to the ggplot?

How may I add the amount of variables (e.g. n=5) of each data.frame on the x-axes to the ggplot?
Tried it with stat_summary. No success.
Thanks in advance for any help!

Can you show what you've tried so far? It would be easier for everyone if you do this using reprex:


RF<-subset(siteData_day_list, siteData_day_list$Method_Org=="RKM / SS" & 
             siteData_day_list$ParameterName=="Acesulfame" & 
             siteData_day_list$ParameterName!="Acesulfame-K" & 
             siteData_day_list$DateTime>="2017-11-01 00:00:00")
RFV<-subset(RF, RF$SiteCode=="RF-V")
RFV_B4<-subset(RF, RF$SiteCode=="RF-V-B4")
RFV_AK3<-subset(RF, RF$SiteCode=="RF-V-AK3")
RFN<-subset(RF, RF$SiteCode=="RF-N")
RFN_B4<-subset(RF, RF$SiteCode=="RF-N-B4")
RFN_AK3<-subset(RF, RF$SiteCode=="RF-N-AK3")

b<-data.frame(group="After SAT",value=RFV_B4$ParameterValue)
c<-data.frame(group="After BAC",value=RFV_AK3$ParameterValue)
d<-data.frame(group="Filtrate ",value=RFV$ParameterValue)        
e<-data.frame(group="After AOP",value=RFN$ParameterValue)

ggplot(, aes(x=group,y=value))+
  ggtitle("Acesulfame")+                                               #Titel
  geom_boxplot()+xlab(NULL)+ylab("Concentration [µg/L]")+              #Achsenbeschriftung
  geom_hline(yintercept=RFV$LOQ, linetype="dashed", color="blue")+     #LOQ-Linie
  geom_vline(xintercept=3.5, color="black", size=1)+                   #Trennlinie

I would like to add above or beneath the plot a table with the mean and the amount of variables of each data.frame of the x-axes.

As we do not have your data (essentially, the first lines of code after you call the libraries), your example is not something others can reproduce. To make a reprex (see the link @mishabalyasin provided), the key is not so much your specific data, as what you want to do.

For putting a table below the plot, you might want to look at the gridExtra package.

There's an example with code in the blog post here by Markus Gesmann: