I want to build the mean and standard error of a continuous variable grouped categorical in R. Then I want the background to have the actual data source points that came to create this average and standard error. The resulting plot will look like this:

I encoded this myself, but this requires several user-defined functions (to generate a standard error, group tools), as well as adding some things to the data frame to generate jitter and bypass some graphic hiccups. Here the code is copied and generates all the necessary data:
ctrl<- rnorm(20,1,0.5)
treated<- rnorm(20,2,0.5)
ctrl.lab<- rep('ctrl',20)
treated.lab<- rep('treated',20)
ctrl.alt<- rnorm(20,1,0.02)
treated.alt<- rnorm(20,2,0.02)
alt<-c(ctrl.alt,treated.alt) later
lab<-c(ctrl.lab,treated.lab)
response<- c(ctrl,treated)
data<-data.frame(lab,response,alt)
errb <- function (x, y, ebl, ebu = ebl, length = 0.06, ...){
arrows(x, y + ebu, x, y - ebl, angle = 90, code = 3,
length = length, ...)
}
meanerr<- function(data,param,grouping){
means<-aggregate(param~grouping,data=data,FUN=mean)
sd<-aggregate(param~grouping,data=data,FUN=sd)
count<-aggregate(param~grouping,data=data,FUN=length)
err<-sd$param/sqrt(count$param)
output<-cbind(means,err)
return(output)
}
d3<-meanerr(data,data$response,data$lab)
d3$alt<-c(1,2)
limx<-c(0.6,2.4)
limy<-c(0,3.1)
plot(data$alt,data$response,
pch=16,
xaxt='n',
ylab=NA,
xlab='',
xlim=limx,
ylim=limy,
col='light gray')
par(new=T)
plot(d3$alt,d3$param,
pch=16,
xaxt='n',
ylab=NA,
xlab='',
cex=2,
xlim=limx,
ylim=limy,
col='black')
axis(1,at=1:2, labels=d3$grouping,cex.axis=1.4)
mtext('response',2,cex=1,line=2)
errb(d3$alt,d3$param,d3$err,col='black',cex=2)
, ! - cstom, ggplot?