2 added 255 characters in body
source | link

DeleteDuplicatesBy may be faster if used as follows:

DeleteDuplicatesBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First]
{{{1, 2, 3}, 10}, {{1, 2, 4}, 30}}

For your second need:

lis = GatherBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First];
mean = Mean /@ Map[Last, lis, {2}];

Then:

Transpose[{lis[[All, 1, 1]], mean}]
{{{1, 2, 3}, 15}, {{1, 2, 4}, 30}}

As a function:

delDupMean[data_] := With[{lis = GatherBy[data, First]},
  Transpose[{lis[[All, 1, 1]], Mean /@ Map[Last, lis, {2}]}]
 ]

Use:

delDupMean[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}]
{{{1, 2, 3}, 15}, {{1, 2, 4}, 30}}

DeleteDuplicatesBy may be faster if used as follows:

DeleteDuplicatesBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First]
{{{1, 2, 3}, 10}, {{1, 2, 4}, 30}}

DeleteDuplicatesBy may be faster if used as follows:

DeleteDuplicatesBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First]
{{{1, 2, 3}, 10}, {{1, 2, 4}, 30}}

For your second need:

lis = GatherBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First];
mean = Mean /@ Map[Last, lis, {2}];

Then:

Transpose[{lis[[All, 1, 1]], mean}]
{{{1, 2, 3}, 15}, {{1, 2, 4}, 30}}

As a function:

delDupMean[data_] := With[{lis = GatherBy[data, First]},
  Transpose[{lis[[All, 1, 1]], Mean /@ Map[Last, lis, {2}]}]
 ]

Use:

delDupMean[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}]
{{{1, 2, 3}, 15}, {{1, 2, 4}, 30}}
1
source | link

DeleteDuplicatesBy may be faster if used as follows:

DeleteDuplicatesBy[{{{1, 2, 3}, 10}, {{1, 2, 3}, 20}, {{1, 2, 4}, 30}}, First]
{{{1, 2, 3}, 10}, {{1, 2, 4}, 30}}