# HG changeset patch # User Christopher Hummersone # Date 1490822743 -3600 # Node ID 731832de7c54e6fa8c954386d51563c63950e229 # Parent b98f92674cbc07ce0f3be1c0280e1bd79472f1d4# Parent a02a9561febfd30e1e190d6083b226207dc7099b Merge branch 'develop’ - MASSEFresults: Further fix to correct output when using aggregating functions. diff -r b98f92674cbc -r 731832de7c54 MASSEFresults.m --- a/MASSEFresults.m Wed Mar 29 13:31:35 2017 +0100 +++ b/MASSEFresults.m Wed Mar 29 22:25:43 2017 +0100 @@ -360,14 +360,18 @@ try filteredTable = varfun(fhandle,dataTable,'InputVariables','value',... 'GroupingVariables',group); + keys = group; catch filteredTable = varfun(fhandle,dataTable,'InputVariables','value',... 'GroupingVariables',altgroup); + keys = altgroup; end % rename value column and delete GroupCount column filteredTable = obj.findRenameVar(filteredTable,'value','value'); filteredTable.GroupCount = []; - dataTable = join(filteredTable, dataTable); + [~, ia, ib] = intersect(filteredTable(:,keys), dataTable(:,keys)); + dataTable.value(ib) = filteredTable.value(ia); + dataTable = dataTable(ib, :); else % normal filter function dataTable = obj.filterRows(dataTable,filterval,col);