One way to solve this issue, is to use the Tabulate Platform to generate the statistics, and then to use
Tables=>Update
to attach the new statistics data table to the original table.
Both the Tabulate Platform and Update Platform surface the JSL, so only minor modifications had to be made to put the 2 pieces of JSL together into one script.
names default to here(1);
dt = data table("test-data");
colList = dt << get column names(string);
dtSum = (Data Table( "test-data" ) << Tabulate(invisible,
Add Table(
Column Table(
Analysis Columns(
eval( colList )
)
),
Row Table( Statistics( Mean, Std Dev ) )
)
)) << Make Into Data Table;
dtsum = current data table();
window("test-data - Tabulate") << close window;
for each( {col}, colList,
as column( dtSum, col) << set name( col || " Statistics")
);
Data Table( "test-data" ) << Update( dtSum ) );
close( dtSum, nosave );
I strongly suggest that you take the time to read the Scripting Guide to enhance your JMP expertise.
Jim