calc_group_mean function

Calculate means of groups of columns