cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-589812%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHow%20can%20I%20set%20the%20value%20of%20a%20specified%20column%20to%20the%20displayed%20value%2C%20ignoring%20the%20original%20significant%20digit%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-589812%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EFor%20example%2C%20make%20the%20actual%20values%20of%20the%20%22new%22%20column%20in%20table%202%20all%20integers.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_09-58-02.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F49075iCE3578CBA184B7A7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222023-01-15_09-58-02.png%22%20alt%3D%222023-01-15_09-58-02.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%3DOpen(%22%24SAMPLE_DATA%2FBig%20Class.jmp%22)%3B%0Ad2%3Ddt%26lt%3B%3CSUMMARY%3E%3C%2FSUMMARY%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-589812%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EScripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-589822%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20can%20I%20set%20the%20value%20of%20a%20specified%20column%20to%20the%20displayed%20value%2C%20ignoring%20the%20original%20significant%20digit%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-589822%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAll%20you%20have%20to%20do%20is%20to%20set%20the%20format%20for%20the%20column%20to%20something%20like%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%26lt%3B%26lt%3B%20Format(%20%22Fixed%20Dec%22%2C%206%2C%200%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Ad2%20%3D%20dt%20%26lt%3B%26lt%3B%20Summary(%0A%20Group(%20%3Aage%20)%2C%0A%20Mean(%20%3Aheight%20)%2C%0A%20Freq(%20%22None%22%20)%2C%0A%20Weight(%20%22None%22%20)%2C%0A%20Link%20to%20original%20data%20table(%200%20)%0A)%3B%0AColumn(%20d2%2C%203%20)%20%26lt%3B%26lt%3B%20Format(%20%22Fixed%20Dec%22%2C%2020%2C%200%20)%3B%0Ad2%20%26lt%3B%26lt%3B%20New%20Column(%20%22new%22%2C%20formula(%20As%20Column(%203%20)%20)%20)%3B%0Ad2%20%26lt%3B%26lt%3B%20run%20formulas%3B%0AColumn(%20%22new%22%20)%20%26lt%3B%26lt%3B%20deleteFormula%20%26lt%3B%26lt%3B%20Format(%20%22Fixed%20Dec%22%2C%206%2C%200%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1673757456058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F49076iAA81DBAA18F260A2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22txnelson_0-1673757456058.png%22%20alt%3D%22txnelson_0-1673757456058.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETo%20capture%20the%20original%20format%2C%20and%20use%20it%20I%20found%20this%20method%20to%20work%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EEval(%20Parse(%20%22Column(d2%2C4)%20%26lt%3B%26lt%3B%22%20%7C%7C%20Char(%20column(dt%2C4)%20%26lt%3B%26lt%3B%20get%20format%20)%20%7C%7C%20%22%3B%22%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-589832%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20can%20I%20set%20the%20value%20of%20a%20specified%20column%20to%20the%20displayed%20value%2C%20ignoring%20the%20original%20significant%20digit%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-589832%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIt%20seems%20that%20JMP%20does%20not%20have%20this%20feature%20and%20excel%20can%20implement%20this%20device.%3CBR%20%2F%3EThe%20%22new%22%20column%20I%20added%20in%20the%20example%20simply%20checks%20that%20the%20precision%20of%20column%203%20is%20an%20integer.%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222023-01-15_13-45-17.png%22%20style%3D%22width%3A%20840px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_13-45-17.png%22%20style%3D%22width%3A%20840px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-01-15_13-45-17.png%22%20style%3D%22width%3A%20840px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F49077iA10DC88E41ED227C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222023-01-15_13-45-17.png%22%20alt%3D%222023-01-15_13-45-17.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
lala
Level VIII

How can I set the value of a specified column to the displayed value, ignoring the original significant digit?

For example, make the actual values of the "new" column in table 2 all integers.

2023-01-15_09-58-02.png

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;
2 REPLIES 2
txnelson
Super User

Re: How can I set the value of a specified column to the displayed value, ignoring the original significant digit?

All you have to do is to set the format for the column to something like

<< 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 );

txnelson_0-1673757456058.png

To capture the original format, and use it I found this method to work

Eval( Parse( "Column(d2,4) <<" || Char( column(dt,4) << get format ) || ";" ) );

 

Jim
lala
Level VIII

Re: How can I set the value of a specified column to the displayed value, ignoring the original significant digit?

It seems that JMP does not have this feature and excel can implement this device.
The "new" column I added in the example simply checks that the precision of column 3 is an integer.

Thanks!

2023-01-15_13-45-17.png