understanding ddply error message
I am trying to figure out why I am getting an error message when using ddply. Example data: data<-data.frame(area=rep(c("VA","OC","ES"),each=4), sex=rep(c("Male","Female"),each=2,times=3), year=rep(c(2009,2010),times=6), bin=c(110,120,125,125,110,130,125,80,90,90,80,140), shell_length=c(.4,4,1,2,.2,5,.4,4,.8,4,.3,4)) bin7<-ddply(data, .(area,year,sex,bin), summarize,n_bin=length(shell_length)) Error message: Error in .fun(piece, ...) : argument "by" is missing, with no default I got this error message yesterday. I restarted R and reran the code and everything was fine. This morning I got the