Subscribe Bookmark RSS Feed

How can I save and reuse a collection of clicks for faster processing?

kpaudel0

Community Trekker

Joined:

Nov 18, 2015

I see save session script but it seems to save everything starting from the beginning. Is there a way to save only part of the session having a set of consecutive clicks which can be rerun for similar other files?

7 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

There is not a "Click" recorder in JMP.  The methodology used in JMP for this is done by creating a JMP Script.  So the methodology typically works in that you run one of the platforms, get the output the way you want it, then save the script, which is a selection under the main red triangle in the output.  Then you run the next platform, and save that script, etc.  As the script builds you effectively are saving the "Clicks: you are talking about.

Jim
kpaudel0

Community Trekker

Joined:

Nov 18, 2015

Thank you, I was able to get the script to add columns and input formula but got stuck here:

I am putting an example questions of what I now want to do with session or table scripts:

My data:

X [mm] Y [mm] Z [µm] Col 01 Col 02 sum col
-142 -145 0 0 0 0
-141 -145 0 0 0 0
-140 -145 0 0 0 0
-139 -145 3 0 0 0
-138 -145 5 0 0 0
-137 -145 8 0 0 0
-91 99 6 0 1 1
-90 99 3 0 1 1
-89 99 9 0 1 1
-88 99 2 0 1 1

I get following when I select ones in the sum col using 'select matching cells' and 'subset' menus):
X [mm] Y [mm] Z [µm] Col 01 Col 02 sum col
-91 99  0 1 1
-90 99  0 1 1
-89 99  0 1 1
-88 99  0 1 1

But, I want the script to do this for me. Would appreciate for your additional suggestions/examples.

I also did 'save session script' but these click menu actions were not captured.

txnelson

Super User

Joined:

Jun 22, 2012

Below is a script that first generates your above data table, using a script, and then selects the rows where the column called "sum col" has the value of "1".  Which is what you requested.  However, I also added in the statement that would take those selected rows, and create a new data table, where you could do further processing:

Names Default To Here( 1 );

// Create the sample table you listed in your reply

dt = New Table( "Sample Table",

       Add Rows( 10 ),

       New Column( "X",

              Numeric,

              "Continuous",

              Format( "Best", 12 ),

              Set Property( "Units", "mm" ),

              Set Values( [-142, -141, -140, -139, -138, -137, -91, -90, -89, -88] )

       ),

       New Column( "Y",

              Numeric,

              "Continuous",

              Format( "Best", 12 ),

              Set Property( "Units", "mm" ),

              Set Values( [-145, -145, -145, -145, -145, -145, 99, 99, 99, 99] )

       ),

       New Column( "Z",

              Numeric,

              "Continuous",

              Format( "Best", 12 ),

              Set Property( "Units", "mm" ),

              Set Values( [0, 0, 0, 3, 5, 8, 6, 3, 9, 2] )

       ),

       New Column( "Col 01",

              Numeric,

              "Continuous",

              Format( "Best", 12 ),

              Set Values( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] )

       ),

       New Column( "Col 02",

              Numeric,

              "Continuous",

              Format( "Best", 12 ),

              Set Values( [0, 0, 0, 0, 0, 0, 1, 1, 1, 1] )

       ),

       New Column( "Sum Col", Numeric, "Continuous", Format( "Best", 12 ), Formula( Sum( :Col 01, :Col 02 ) ) ),

       Set Row States( [1, 0, 0, 0, 0, 0, 0, 0, 0, 0] )

);

// This wait function allows for the table to be completed before the next statements

// are processed

wait(.1);

// Now select the rows where the column called Sum Col have the value of 1

dt << select where(:Sum Col == 1);

// Next create a new table from the selected rows

dtNew = dt << subset(Output Table Name("New Table"), selected columns(0), selected rows(1));

Jim
kpaudel0

Community Trekker

Joined:

Nov 18, 2015

Thank you so much. Last  lines starting from 'wait(0.1)' were sufficient. Mine took (0.2) to work

Craige_Hales

Staff

Joined:

Mar 21, 2013

The wait( .1 ) allows the column formula to run in the background before using the table.  A more predictable way to do this:

dt<<runFormulas;

which means you don't have to guess how long to wait.  It is faster because (1) you don't have to wait a little longer than the work requires and (2) because the formulas evaluate faster than when they run in the background.

Craige
Craige_Hales

Staff

Joined:

Mar 21, 2013

and, <<SelectWhere will do the RunFormulas for you in JMP 13. 

<<RunFormulas doesn't do anything if there are no formulas or the formulas have already run.

Craige
kpaudel0

Community Trekker

Joined:

Nov 18, 2015

Thanks much.  May I also know how to add statistics summary(mean, max, min, stdev. and, range) of z variable on the script for a contour plot?