Hello JMP community,
I am analyzing larger amounts of data, typically 350k rows.
For each row, the code runs a for loop within a for loop to calculate the mean offset by "Wafer ID". I’m looking for a faster way of doing this.
Is there a way to make the processing faster? The current script takes ~1 hour to complete the loop
Names Default To Here( 1 );
dt1 = Data Table( "Reference Data Table.jmp" );
dt2 = Data Table("Data table");
Col_List1 = dt2 << Get Column Names( "String" );
Summation(
c = 1,
N Col( dt2 ) - 1,
values = [];
name = Column( dt2, c ) << Get Name;
If( Contains( name, "Currents" ) | Contains( name, "Voltage" ) | Contains( name, "Resistance" ),
rows = dt1 << Get Rows Where( :tests == name );
col = Column( dt2, c );
col mean = Col Mean( col );
For Each Row(
dt2,
mean = dt1:Mean[rows];
measure = mean - Col Mean( As Column( dt2, c ), :Wafer ID );
values |/= col[] + measure
;
);
col << Set Values( values );
);
0
);