building data aggregator for R