例如,将表 2 中“新”列的实际值全部设为整数。

dt=Open("$SAMPLE_DATA/Big Class.jmp");
d2=dt<
<SUMMARY></SUMMARY>
您所要做的就是将列的格式设置为类似
<< Format( "Fixed Dec", 6, 0 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
d2 = dt << Summary(
Group( :age ),
Mean( :height ),
Freq( "None" ),
Weight( "None" ),
Link to original data table( 0 )
);
Column( d2, 3 ) << Format( "Fixed Dec", 20, 0 );
d2 << New Column( "new", formula( As Column( 3 ) ) );
d2 << run formulas;
Column( "new" ) << deleteFormula << Format( "Fixed Dec", 6, 0 );

要捕获原始格式并使用它,我发现此方法有效
Eval( Parse( "Column(d2,4) <<" || Char( column(dt,4) << get format ) || ";" ) );
JMP好像没有这个功能,excel可以实现这个装置。
我在示例中添加的“新”列只是检查第 3 列的精度是否为整数。
谢谢!
