system.time(t2<-tapply(mydf$b,mydf$a,mean))