I have the data frame resambling the one in the below
Date Expenditure Indicator 29-01-2011 5455 212 25-01-2012 5452 111 11-02-2011 365
Upgrade from base and use data.table instead to simplify (and speed up) your code/life:
data.table
library(data.table) dt = as.data.table(dta) dt[, lapply(.SD, sum), by = Date]