SPLIT from tall to wide: how to group the resulting columns dynamically?So I've got a large dt that I'm splitting from TALL to WIDE. This results in a huge qty of columns, all with the header format = "Step#_Parameter_Function".
The amount of these columns vary and are never predictable and set, nor are the step #'s or names.
How would i be able to then group these columns by Step#? Some sort of loop to scan through the long list of columns, pick out the first Step# and then assign it to a group labeled that "Step#"?
<< Split(
Split By( :recipe_step_id, :parameter_name, :aggregate_function ),
Split( :value ),
Group( :recipe, :equipment_id, :chamber_id, :wafer_scribe, :wafer_process_start_time ),
Output Table( "Wide" ),
Remaining Columns( Drop All ),
Sort by Column Property
);

ScriptingRe: SPLIT from tall to wide: how to group the resulting columns dynamically?Here is a simple script that creates a new group of columns that begin with the characters "NPN"

names default to here(1);
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
colNamesList = dt << get column names(string, continuous);
NPNList = {};
for(i=1,i<=nitems(colNamesList),i++,
If(contains(colNamesList[i],"NPN")==1,
insert into(NpNList,colNamesList[i])
)
);
dt << group columns("NPNGroup", NPNList);
Re: SPLIT from tall to wide: how to group the resulting columns dynamically?amazing. One final question. Is it possible to feed it a list of Character String Groups to run through, looking for those columns that match, then putting them in their respective groups?
like a list of:
columns that start with "AAA", "BBB","CCC",etc
and then put them in groups labeled AAA, BBB, CCC
?
how to error skip if there are no columns matching BBB?