Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?I have seen Big Class.jmp's table with the same JSL get a mean column that already retains a significant number, but my own table does not.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt = Current Data Table();
d2 = dt << Summary(
Group( 2 ),
Mean( 4 ),
Freq( 0 ),
Weight( 0 ),
Link to original data table( 0 ),
statistics column name format( "column" )
);
Thanks!

Basic Data Analysis and ModelingWindows回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?Is your desire to have the actual value in the data table to only have a specified number of significant digits or is the requirement to just have the format for the result column to have the specified number of digits?
By default, when the Summary table is generated for a column that has the number of decimal places specified in it's format, JMP will add an additional decimal place to the output tables summarized column. To set the format's number of significant decimals to anything other than this will require the adding of JSL to set the format.
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?I want the actual value in the data table to only have a specified number of significant digits.
Thank Jim!
Column( d2, 3 ) << Format( "Fixed Dec", 20, 2 );
r = N Row( d2 );
ar = d2 << GetAsMatrix( 3 );
For( i = 1, i <= r, i++,
ar[i, 1] = Round( ar[i, 1], 2 )
);
d2[0, 3] = ar;
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?There are several ways to compress your data. If you want to compress specific columns, you can select them and then go to
Cols=>Utilities=>Compress Selected Columns
The preferences can be set to save the tables in a compressed format. There is also a preference that will allow for propagate compressed columns.
Look in the General preferences.
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?Is your issue with the size of the data table in RAM memory or in saving the data to disk?
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?I am not aware of any additional options you can use beyond the preferences you have set. Other Community members may have additional information.
回复: Averaging with the Summary command. How can I use the mean column of the generated table to keep a significant number?If you have already enabled compressions and ok with the value changes, you can use a loop like you suggested. Loop below might be a bit simpler than your suggestion
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt_summary = dt << Summary(
Group(:age),
Mean(:height),
Freq(0),
Weight(0),
Link to original data table(0),
statistics column name format("column")
);
cont_cols = dt_summary << Get Column Names(Continuous, "String");
Column(dt_summary, "height") << Format("Fixed Dec", 20, 2);
For Each({colname}, cont_cols,
Column(dt_summary, colname) << Set Values(
Round(dt_summary[0, colname], 1);
)
);
Also depending on your data, you might want to go for integers as they take less space and then you could further compress those to short-integers https://www.jmp.com/support/help/en/18.0/#page/jmp/the-shortinteger-format.shtml#