SumBy

From VLECK
Jump to: navigation, search



This page is just a stub. Please take the time to turn it into something useful whenever you can.


SumBy

Syntax

return = SumBy(Values); return = SumBy(Value1;Value2);

Return value

SumBy returns the sum of Value1 grouped by Value2 if Value2 is a structure, SumBy returns an array for each array in Value2


Parameters

Values matrix or structure with numerical values


Example


a = 1#9;
b = (redim(1;3),redim(2;3),redim(3;3));
c = sumby(a;b);

c
[1] : a	[2] : Levels	[3] : Indices

[1] : a
6	15	24

[2] : Levels
1	2	3

[3] : Indices
1	1	1	2	2	2	3	3	3