Aggregating columns of data in R with reshape2