Inserting delimiters in Column names of SPLIT TableI have a simple question:
I have a table that has four columns. I want to split the "Value" column by (LOT, WAFER) to get the split table attached. The column names are LOT WAFER ( i.e. LOT space and then WAFER). I want to add a delimiter between these two such that column names are LOT_WAFER or LOT | WAFER
Is there a simple way to do that? I could potentially create a new column in the parent table which is LOT_WAFER or LOT|WAFER and then split by that wafer but I was hoping if there is a way around it?
Thanks
Re: Inserting delimiters in Column names of SPLIT Table
// Combine columns
dt1 = Current data table ();
dt1 << Combine Columns(
columns( :LOT, :WAFER ),
Column Name( "Lot_Wafer" ),
Delimiter( "_" ),
Multiple Response( 0 )
);
// Transpose data table
// → Data Table( "Split" )
dt1 << Transpose(
columns( :Value ),
By( :Test ),
Label( :Lot_Wafer ),
Output Table( "Split" )
);
// Delete column: Label
Data Table( "Split" ) << Delete Columns( :Label );
This script should work. To do this via GUI
1. With Lot and wafer columns selected Cols/Utilities/Combine columns
2. Select name deselect Multiple response check box put in the desired delimiter
3. Tables Menu/Transpose
4. Transpose Columns "Value", Label "Lot_Wafer", By "Test"
Done. I deleted an extra column with the script if you want the extra column removed.
Re: Inserting delimiters in Column names of SPLIT TableHere's what I would have done , after splitting the table :
dt = current data table(); // the already split table
ColLst = dt << get column names("string");
for(i=2, i<=nitems(ColLst), i++,
Column(dt,i) << Set name(Substitute(ColLst[i]," ","_"))
);I've never before noticed that JMP has the Combine Columns capability mentioned by @Peter_Hersh ! That's a good feature to know about too.