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
mfoster
Level I

Joining tables with different significant digits

I am trying to join a DOE table created Jmp with a table created in an external program and imported into Jmp.  I've figured out that if I expand the format to 16 decimals that the data does not match. For example, the initial value used when creating the DOE table was something like 1.2, the DOE table value to 16 decimals is  1.2000...002, and the imported data is 1.2000...000.  

 

Is there a way to make this just work?  I suppose I could go into the DOE table and manually change every value...ugh.  (Tried that for one line and it worked.)

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Joining tables with different significant digits

You can also directly overwrite values with <<set each value, but I would suggest trying other options first, if you are just starting with scripting

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
:NPN1 << Set Each Value(Round(:NPN1));
-Jarmo

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Joining tables with different significant digits

Use the Round() function or floor() function to truncate to the desired number of significant digits.  Then you can join the tables.

 

Jim
mfoster
Level I

Re: Joining tables with different significant digits

Ok, that works.  Guess I should write a script so here's a follow-on question:

 

I've got a script in work, but I end up with new columns with the rounded value.  Is there any way I can copy the values in that formula column back to the original column?  (I want to keep the properties of the original column as part of the DOE.)

 

There is a simple "copy data" command, but no "paste data".

 

Thanks,

Michael

txnelson
Super User

Re: Joining tables with different significant digits

interactively you can select all of the values in the column you want to copy, and then move your cursor to one of the selected cells and right click and select copy.  Move to the column you want to paste in and right click on the first cell in the column and select paste.

Here is a simple script that will copy all of the values from one column to another.

Names Default To Here( 1 );
dt = Open( "$sample_data/big class.jmp" );
:age << set values( :weight << get values );

 

  

Jim
jthi
Super User

Re: Joining tables with different significant digits

You can also directly overwrite values with <<set each value, but I would suggest trying other options first, if you are just starting with scripting

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
:NPN1 << Set Each Value(Round(:NPN1));
-Jarmo
mfoster
Level I

Re: Joining tables with different significant digits

Thanks.  This is so much simpler than my complicated way with additional columns, tables and updates.  Need to remember "Set".