5

Values @ GroupBy[list, Most, Mean] {{1, 1, (a + b)/2}, {1, 2, (c + d)/2}, {1, 3, e}} Also Mean /@ GatherBy[list, Most] {{1, 1, (a + b)/2}, {1, 2, (c + d)/2}, {1, 3, e}}


4

Converting them to associations and using Merge might be a good solution: In[1]:= KeyValueMap[Append, Merge[<|#[[1 ;; 2]] -> #[[3]]|> & /@ {{1, 1, a}, {1, 1, b}, {1, 2, c}, {1, 2, d}, {1, 3, e}}, Mean]] Out[1]= {{1, 1, (a + b)/2}, {1, 2, (c + d)/2}, {1, 3, e}}


3

Is this faster and works correctly for all your cases? list={{1,1,a},{1,1,b},{1,2,c},{1,2,d},{1,3,e}}; Mean/@Split[Sort[list],Most[#1]==Most[#2]&] (*{{1, 1, (a + b)/2}, {1, 2, (c + d)/2}, {1, 3, e}}*)


Only top voted, non community-wiki answers of a minimum length are eligible