Sum of all rows into a listI'm trying to take the sum of all of my rows and add it to a list. So, the sum of row 1 will be item 1, sum of row 2 will be item 2, etc. Is there an easy way to do this using jsl?
Design of ExperimentsRe: Sum of all rows into a listYou can also use matrix calculations, below is one option
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
m = dt << get as matrix;
sums = V Sum(m`);
tolist = As List(sums)[1];
Re: Sum of all rows into a listHere is one way to do it. Others may have better methods
Names Default To Here( 1 );
dt = Current Data Table();
sumMatrix = [];
For Each( {col}, dt << get column names( string, numeric ),
sumMatrix = sumMatrix || Col Sum( Column( dt, col ) )
);