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?
and, <
<Re: How can I save and reuse a collection of clicks for faster processing?
The wait( .1 ) allows the column formula to run in the background before using the table. A more predictable way to do this:
dt<
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.
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));
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.
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.