Update aggregation.R