TabellenskripteHallo. Ich habe einige Skripte gespeichert, die ich bei der Durchführung von Ausreißeranalysen verwenden möchte. Dies sind Fit Model-Skripte, und ich möchte jedes Mal 1 Skript ausführen, wenn ich eine Schleife verwende, um einen Wert auszublenden und auszuschließen. Ich habe die Skripte jedoch nach Spaltennamen benannt. Daher möchte ich, dass der Skriptname mit dem Spaltennamen übereinstimmt und nur dieses Skript ausführt. Ich habe ein Beispiel für die Linnerud-Beispieldaten betrachtet.
dt = current data table();
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
If( Contains( ColNames[i], "Outlier" ),
Col1 = Column(dt,i);
max = data table(dt);
max << select where(as column(Col1)==abs(Col Max( Col1 ))) << Hide and Exclude;
//Hide and exclude the MAX val from Outlier 1 Rest Pulse, and Run Outlier 1 Rest Pulse script
//Run Script("Outlier 1 Rest Pulse");
)
);Ist das möglich?
Betreff: TabellenskripteJa, es ist möglich. Unten finden Sie eine Aktualisierung Ihres Codes.
Names default to here(1);
dt = Current Data Table();
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
// Clear the Hide and Excludes from the last loop
dt << clear rowstates;
If( Contains( Col[i], "Outlier" ),
Col1 = Column( dt, i );
dt << select where( As Column( Col1 ) == Abs( Col Max( Col1 ) ) ) << Hide and Exclude;
//Hide and exclude the MAX val from Outlier 1 Rest Pulse, and Run Outlier 1 Rest Pulse script
//Run Script("Outlier 1 Rest Pulse");
)
// Make sure Auto Recalc is unselected in the platforms you run, since if it is active, all
// the platforms will recalcuate to new results each time the different Hide and Excludes are changed
);