cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lala
Level VIII

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!

2024-05-08_15-59-13.png

10 REPLIES 10
jthi
Super User

回复: 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#

 

 

-Jarmo