Use Text To Columns to get this
Then stack your data with multiple series stack
and finally remove extra columns, rename column headers and fix column data/modelling types
JMP created script is a good starting point for the final JSL
// Text to columns
Data Table("Untitled 6") << Text to Columns(columns(:Column 1), Delimiters("#"));
// Stack data table
// → Data Table("Untitled 11")
Data Table("Untitled 6") << Stack(
columns(
:Column 1 1, :Column 1 2, :Column 1 3, :Column 1 4, :Column 1 5, :Column 1 6,
:Column 1 7, :Column 1 8, :Column 1 9, :Column 1 10, :Column 1 11,
:Column 1 12, :Column 1 13, :Column 1 14, :Column 1 15
),
Source Label Column("Label"),
Stacked Data Column("Data"),
Drop All Other Columns(1),
Number of Series(3),
Output Table("Untitled 11.jmp")
);
// Delete columns
Data Table("Untitled 11") << Delete Columns(:Label, :Label 2, :Label 3);
// Recode column names
Local({dt = Data Table("Untitled 11"), names},
names = Recode(
dt << Get Column Names(String),
{Map Value(
_rcOrig,
{"Data", "Value1", "Data 2", "Value2", "Data 3", "Value3"},
Unmatched(_rcNow)
)}
);
For Each({name, i}, names, Column(dt, i) << Set Name(name));
);
// Standardize column attributes
Local({old dt = Current Data Table()},
Current Data Table(Data Table("Untitled 11"));
For Each({col, index}, {:Value1, :Value2, :Value3},
col << Data Type(Numeric, Format("Best", 12)) <<
Set Modeling Type("Continuous")
);
Current Data Table(old dt);
);
-Jarmo