Choose Language Hide Translation Bar
Community Trekker

Run Table Scripts?

I have saved some scripts that I would like to use when I perform outlier analysis. These are Fit Model scripts and I want to run 1 script every time I use a loop to hide and exclude a value. However, I have named the scripts as per column names. So I want the script name to match the column name and run only that script. I have considered an example of the Linnerud sample data. 

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");

Is this possible? 

0 Kudos

Re: Run Table Scripts?

try looking at the Summarize function. That will help you get a list of levels in the column you want to loop through. 

Check the Scripting index for an example

JMP Systems Engineer, Pharm and BioPharm Sciences
0 Kudos