- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
decimal places in summary table
Hi,
I am summarizing a jmp data table. In the summary table, I want the columns to have decimal places till 4.
However, jmp truncates everything after the decimal point.
When I try to retrieve the format for a column using jsl, it says the format is empty.
dt:Name("Median(A)")<< get property("Format");//Empty
dt:Name("Median(A)")<<Set property("Format", {"Scientific",12,2});//Scriptable[] but no change
Applying format through code doesn't work.
However, if I do this manually through column info dialogue box, by specifying decimal points, it does work.
I have like 50 columns and I wish to code this decimal format after selecting them.
Any help will be greatly appreciated.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: decimal places in summary table
Get Property and Set Property are not the functions to use for the setting and retireving formats. The "Format" and "Get Format" messages are used.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Show( dt:weight << get format );
dt:weight << Format( "Fixed Dec", 12, 6 );
Show( dt:weight << get format );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: decimal places in summary table
Get Property and Set Property are not the functions to use for the setting and retireving formats. The "Format" and "Get Format" messages are used.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Show( dt:weight << get format );
dt:weight << Format( "Fixed Dec", 12, 6 );
Show( dt:weight << get format );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: decimal places in summary table
Perfect, works! Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: decimal places in summary table
Hi @txnelson , can you tell how to apply the get format into a new column? for example
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dtformat= dt:weight << get format );
dt:weight << dtformat; (This is not working)
Show( dt:weight << get format );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: decimal places in summary table
Here is my old school way of handling the issue. I am sure others may have a more straightforward way of handling it.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dtformat= char(dt:weight << get format) ;
// Show the current format
Show( dt:weight << get format );
// Change the format and display the change
dt:weight << format("engineering");
Show( dt:weight << get format );
// Set the format back to the original format
eval(parse("dt:weight << " || dtformat || ";" ));
Show( dt:weight << get format );