ループスルーして列を名前で動的にグループ化するスクリプトだから私はこれを理解しようとしていますが、それはまったく機能していません。
TallからWideに分割したKey-Valueペアのテーブルがあります。 最終的には約1万列になり、すべてが次のような通常の命名構造になります。
"15.02.0 param1"、 "15.02 param2"、 "15.02 param3" .... "15.03 param1"、 "15.03 param2"、 "15.03 param3"、..
これらすべての列を調べて、開始項ごとに動的にグループ化するにはどうすればよいですか?すなわち。グループ内のすべての15.02%列、すべての15.03%列、すべての15.04%、...すべての17.06%....そして、グループ番号に基づいてグループに名前を付けますか?
私のスクリプトは、すべてを1つのグループにグループ化するだけです。 ug。
//**split Aggregate Data from TALL to WIDE, grouping WIDE columns by StepID
dt = current data table();
Summarize( dt, RecipeStepIndex = by( :RecipeStepId) );//get list of unique RecipeStepID's
//split the table TALL to WIDE
dt << Split(
Split By( :RecipeStepId, :ParameterName, :AggregateFunction ),
Split( :Value ),
Group( :Recipe, :ProcessTime, :Tool, :Chamber, :Lot, :WaferScribe ),
Output Table( "AggWide" ),
Remaining Columns( Drop All ),
Sort by Column Property,
dt << sort( by( :Recipe, :EquipmentId, :ChamberId, :LotId, :SlotNo ))
);
dtAggWide = current data table();
ColNamesList = dtAggWide << get column names(string, continuous); //get the column names of the WIDE table
//Create an empty list for the matching columns
RecipeStepList = {};
// Find matching column names
For( i = 1, i <= N items( RecipeStepIndex ), i++,
For( j = 1, j <= N Items( ColNamesList ), j++,
If(
Contains( ColNamesList[j], RecipeStepIndex[i] ),
Insert Into( RecipeStepList, ColNamesList[j] ),
);
);
);
// If groups of columns are found, create Col groupings
If( N Items( RecipeStepList ) > 0,
dtAggWide << select columns( RecipeStepList );
dtAggWide << group columns();
);スクリプティングRe:列をループして名前で動的にグループ化するスクリプトこれを行うには多くの方法があります。
これは、最初にグループの名前としてキーを使用してグループを連想配列に構築し、値がグループ内の列のリストであり、次にその連想配列をループしてデータテーブル内の列をグループ化する1つの例です。 グループ名を取得するには、列名にWord()関数を使用します。 For Eachを使用するため、これにはJMP16が必要です。
Names Default To Here(1);
// this solution requires JMP16
dtAggWide = New Table("Untitled",
Add Rows(0),
New Column("15.02.0 param1", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.02.0 param2", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.02.0 param3", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.03 param1", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.03 param2", Numeric, "Continuous", Format("Best", 12), Set Values([]))
);
col_list = dtAggWide << Get Column Names("String");
// first get the column group names and columns<BR />// in this solution case we use associative array
aa_groups = Associative Array();
For Each({col_name}, col_list,
col_group = Word(1, col_name, " ");
If(!Contains(aa_groups, col_group),
aa_groups[col_group] = {};
);
Insert Into(aa_groups[col_group], col_name)
);
Show(aa_groups);
For Each({{key, value}}, aa_groups,
dtAggWide << Group Columns(key, value);
);

Re:列をループして名前で動的にグループ化するスクリプトありがとう、まもなくこれを試してみます。
しかし、グループ化配列リストを動的に構築するのはどうですか? 基本的に、:RecipeStepIdの一意の値はそれぞれgroupby名である必要があります。 テーブルを分割して「RecipeStepIndex」に保存する前に、最初にそれを試してみました
Summarize( dt, RecipeStepIndex = by( :RecipeStepId) );//get list of unique RecipeStepID's
Re:列をループして名前で動的にグループ化するスクリプトたとえば、RecipeStepIndexに基づく列名を使用して、連想配列を「事前入力」することができます。 ほとんどの場合、RecipeStepIndexは分割された列名の先頭から検出されるため、これは引き続き機能します。
Names Default To Here(1);
// this solution requires JMP16
dtAggWide = New Table("Untitled",
Add Rows(0),
New Column("15.02.0 param1", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.02.0 param2", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.02.0 param3", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.03 param1", Numeric, "Continuous", Format("Best", 12), Set Values([])),
New Column("15.03 param2", Numeric, "Continuous", Format("Best", 12), Set Values([]))
);
col_list = dtAggWide << Get Column Names("String");
// first get the column group names and columns// in this solution case we use associative array
aa_groups = Associative Array();
//Summarize(dt, RecipeStepIndex = by(:RecipeStepId));//get list of unique RecipeStepID's
RecipeStepIndex = {"15.02.0", "15.03"};
aa_groups = Associative Array(RecipeStepIndex, Repeat({{}}, N Items(RecipeStepIndex)));
For Each({col_name}, col_list,
col_group = Word(1, col_name, " ");
Insert Into(aa_groups[col_group], col_name)
);
For Each({{key, value}}, aa_groups,
dtAggWide << Group Columns(key, value);
);