I have very large dataset like following:
myd <- data.frame (id = paste("id_",rep(1:500000, each = 3), sep=""),
yvar= rep(1:500000, each= 3), xvar= rep(1:500000, each= 3))
I would like to calculate mean for ids. I am trying the following it is taking long time.
myd1 <- aggregate(myd, list(myd$id), mean)
Any quicker to do this ?