I have timed data (Turn-up Time) I used to create a Time Differnce column to easily identify different run sequences. What I am struggling with is how to use this to creat a new column (Run Number) that automatically groups the data. Ideas?
This script should do the trick:
Names Default To Here( 1 ); dt = Current Data Table(); dt << New Column( "Run Number", character, formula( If( Row() == 1, runnum = 1 ); If( :Time Difference Min > Col Mean( :Time Difference Min ) + Col Std Dev( :Time Difference Min ), runnum = runnum + 1 ); runnum; ) );
Jim, works perfectly, many thanks!!