Create calc_average.R