Change multiple data table names product of a subset
Oct 7, 2015 1:57 AM(1506 views)
I would like to change in batch the name of multiple opened tables which are a product of a Table subset.
If I use the following script to subset a table named "MyData.jmp", I get tables with the name of the original table followed by a space and a sequential number (e.g. "MyData 1", "MyData 2", "MyData 3" , "MyData n"). Instead I would like to give each table the name of the specific level of the column by which it has been subset (as explained after the script).
//Subset a Data Table (By different column levels).
Data Table( "MyData.jmp" ) <<
By( :Ref ),
Selected columns only( 0 ),
On the other hand, it if I subset the table ("MyData.jmp") using the interface I get table names such as "Ref=P100_1", "Ref=P100_2", "Ref=P100_25". Meaning that I have subset the table by the column "Ref" and after the "=" the levels of the column that by which I have subset appear. In this case I am interested in having just the part "P100_1", "P100_2", "P100_25" as the names of the tables. In this case I would need to delete in batch the same text from all of the data tables ("Ref=").