How to achieve this simple Column addition in JSL?
Hi,
Just a newbie of JSL.
I open a data tabel (each column is numeric type).
And want to add up each other column to a new column "sum".
Given the following script, I always get the Log Comment:
invalid argument in access or evaluation of 'Column' , Column( dt, j )
Can anyone help me out?
Thanks, Fred
---------
dt = currentdatatable();
nc = ncol(dt);
nr = nrow(dt);
show(nr);show(nc);
sumcol = dt << newcolumn("sum", numeric);
for(i=1, i<=nc, 1,
for(j=1, j<=nr, 2,
sumcol += column(dt, j);
)
)