표 1에서 표 2까지 같은 테스트 이름으로 다른 테스트 번호를 요약하려고합니다. 이것을 달성하기 위해 JMP에서 빠르고 더러운 방법이 있습니까? 감사
1 번 테이블
| 시험 | 시험 이름 |
| T17561 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17562 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17563 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17564 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17565 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17566 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17567 | Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB |
| T17621 | Ana_PowerRegulator_ATE_Chara @ LA |
| T17622 | Ana_PowerRegulator_ATE_Chara @ LA |
| T17623 | Ana_PowerRegulator_ATE_Chara @ LA |
| T17624 | Ana_PowerRegulator_ATE_Chara @ LA |
표 2
| 시험 이름 | 시험 |
| Ana_Limiter_vdhf_ATE_Chara_LA @ LA-LB | T17561, T17562, T17563, T17564, T17565, T17566, T17567 |
| Ana_PowerRegulator_ATE_Chara @ LA | T17621, T17622, T17623, T17624 |
나는 네가 무엇을 요구하고 있는지 정확히 알지 못한다. 그러나, 테이블 1에서 테이블 2를 생성하려면 다음과 같이하십시오.
names default to here(1);
// Create the sample table
dt = New Table( "Example",
Add Rows( 11 ),
New Script(
"Source",
Data Table( "Untitled 13" ) << Split(
Split By( :Column 2 ),
Split( :Column 1 ),
Sort by Column Property
)
),
New Column( "testnum",
Character,
"Nominal",
Set Selected,
Set Values(
{"T17561", "T17562", "T17563", "T17564", "T17565", "T17566", "T17567",
"T17621", "T17622", "T17623", "T17624"}
),
Set Display Width( 68 )
),
New Column( "testname",
Character,
"Nominal",
Set Values(
{"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB",
"Ana_Limiter_vdhf_ATE_Chara_LA@LA-LB", "Ana_PowerRegulator_ATE_Chara@LA",
"Ana_PowerRegulator_ATE_Chara@LA", "Ana_PowerRegulator_ATE_Chara@LA",
"Ana_PowerRegulator_ATE_Chara@LA"}
),
Set Display Width( 244 )
)
); // End of Example table creation
// Create the new summary data table
dtTrans = dt << Transpose(
columns( :testnum ),
By( :testname ),
Output Table( "Transpose" )
);
// Get rid of the not needed column called "Label"
dtTrans << delete columns("Label");
// Get a list of the columns in the data table
colNames = dtTrans << get column names(string);
// Get rid of the first column so the list only contains the transposed columns
colNames = remove(colNames,1,1);
// Create the new testnum column
dtTrans << New Column( "testnum", character );
// Loop through all of the rows in the table and create the concatenated column
For( theRow = 1, theRow <= N Rows( dtTrans ), theRow++,
:testnum[theRow] = :Row 1[theRow];
For( theCol = 2, theCol <= N Items( colNames ), theCol++,
If( Column( colNames[theCol] )[theRow] != "",
:testnum[theRow] = :testnum[theRow] || ", " || Char( Column( colNames[theCol] )[theRow] )
)
);
);
// Delete the unnecessary columns
dtTrans << delete columns( colNames );
네가 원하는 것이 다른 것이라면 네가 원하는대로 더 자세하게 설명해 줄 수 있겠 니?
내가 제공 한 JSL은 여러 테스트 이름과 테스트 번호에서 작동합니다.
Names Default To Here( 1 );
dt = New Table( "Example", New Column( "testname", character ), New Column( "testnum", character ) );
For( i = 1, i <= 50, i++,
tnam = "Testname" || Char( i );
kstart = Random integer( 1, 5 );
For( k = kstart, k <= Random integer( 1, 25 + kstart ), k++,
dt << add rows( 1 );
dt:testname[N Rows( dt )] = tnam;
dt:testnum[N Rows( dt )] = "T" || Char( k );
);
);
// Create the new summary data table
dtTrans = dt << Transpose(
columns( :testnum ),
By( :testname ),
Output Table( "Transpose" )
);
// Get rid of the not needed column called "Label"
dtTrans << delete columns("Label");
// Get a list of the columns in the data table
colNames = dtTrans << get column names(string);
// Get rid of the first column so the list only contains the transposed columns
colNames = remove(colNames,1,1);
// Create the new testnum column
dtTrans << New Column( "testnum", character );
// Loop through all of the rows in the table and create the concatenated column
For( theRow = 1, theRow <= N Rows( dtTrans ), theRow++,
:testnum[theRow] = :Row 1[theRow];
For( theCol = 2, theCol <= N Items( colNames ), theCol++,
If( Column( colNames[theCol] )[theRow] != "",
:testnum[theRow] = :testnum[theRow] || ", " || Char( Column( colNames[theCol] )[theRow] )
)
);
);
// Delete the unnecessary columns
dtTrans << delete columns( colNames );
